linux

How does GDB find the symbol of a function when backtracing in MIPS Linux?

I'm trying to implement a function to backtrace a crashed user space process in kernel. Since, I'm working in Kernel, I don't have the luxury of any libraries and provided backtrace function doesn't support MIPS architecture. I'm just wondering if I can emulate what GDB does. The version of the kernel is 2.6.21. ...

How can I parse the output of /proc/net/dev into key:value pairs per interface using Python?

The output of /proc/net/dev on Linux looks like this: Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed lo:18748525 129811 0 0 0 0 0 0 18748525 129811 ...

Linux/perl mmap performance

I'm trying to optimize handling of large datasets using mmap. A dataset is in the gigabyte range. The idea was to mmap the whole file into memory, allowing multiple processes to work on the dataset concurrently (read-only). It isn't working as expected though. As a simple test I simply mmap the file (using perl's Sys::Mmap module, using...

Executing win32 file ( using UpdateResource winapi ) in unix

I guess it is impossible, but I will ask it anyway. I have a Windows application that executes BeginUpdateResource / UpdateResource / EndUpdateResource Can I somehow execute this on Linux/Unix? Its server-side, so no GUI emulator could be running. ...

Is there anyway to display a custom form in Java that acts similar to TrayIcon.displayMessage()?

Using Java is there anyway to display a custom form/image that behaves similar to TrayIcon.displayMessage() function in that it displays just above the system tray for a while then disappears? I am also looking for a way to display multiple notifications at the same time by having them display above each other. If not, how do I find th...

Crash with boost::thread

Hello, I am using wxwidgets together with boost::thread. The Thread is a worker thread which sends some Events to the GUI: Thread creation: thrd = boost::thread(boost::bind(workerFunction,this)); Send Message to the GUI: wxPostEvent(loWindow, event); wxSafeYield(); Under Windows I don't see any problems, but when starting the app...

Linux sockets communicating with QTcpSockets in Qt 4

I am trying to communicate with TCP between a Qt program and a regular linux program. I have an existing linux client server program and I am trying to replace the server program with a Qt application. Here is the linux client code #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h>...

undelete the deleted command in bash.

If you have written a really long command, say cd /very/long/path, and then you do ctrl+c or ctrl+u (if the cursor is at the end), and then you realise that you want the command back, is there any way to get the full line back without re-typing. Is there any trick to change .bashrc so that bash_history keep track of keys pressed on the s...

Python 2.4 plistlib on Linux

According to http://docs.python.org/dev/library/plistlib.html, plistlib is available to non-Mac platforms only since 2.6, but I'm wondering if there's a way to get it work on 2.4 on Linux. ...

How to build twice the same Linux Kernel sources and get the the same checksum

I'm searching if it's possible to build twice the same Linux Kernel (same sources, same environment, same options, same compiler) and get the the same checksum. Anybody knows how to do? ...

stat systecall in linux returning error

I am using RHEL 4 i am using syscall stat as follows:- if (stat ("file",&stat_obj)){ if (errno == ENOENT){ printf("File not found"); }else{ printf("Unexpected error occured %d ",errno); } } sometimes i get error message as ""Unexpected error occured 0" That means i get error as "0" . i checked file permissions that are...

Discovery of Dynamic library dependency on Mac OS & Linux

Hi, On Windows there is a tool Depends.exe to discover dependency of an EXE/DLL file on other DDLs. Which commandline tool is equivalent on Mac OS and Linux? Please kindly advise. Thank you! ...

How to find which process the linux os running at a given moment ?

So a OS multi-tasks and runs one process at a given moment (assuming it's a single core machine). Is there a way I can track/poll and find which process was running at what time and at what time it was put in the queue and retrieved back. Are there any system calls for this ?. Is there a way to achieve this without modifying the linux ke...

How do i automatically set the $DISPLAY variable for my current session

I see that $display is set to localhost:0,0 if i am running over a vnc server this may not be correct, is there a way to automatically set it in my login script? ...

current directory doesn't appear in title bar when running under screen

My xterm $prompt variable in my .tcshrc is: set prompt="%{\033]0;%m:%~\007%}%{^[[;37;1m%}%B%{^[[;34;1m%}%m%{^[[;34;1m%}:%b%c%# " The highlighted part above (%{\033]0;%m:%~\007%}) puts the hostname (%m) and the current directory (%~) in the title bar. (At least I think that that's what puts it in the title bar; it's been a while since ...

Arial font required in PDF (BIRT pdf renderer, Linux)

Hi, I've created a rptdesign file using BIRT IDE. This file contents are in Arial font, when I export the report to PDF in windows it works fine. I uses the default viewerServlet to create reports. But when I moved the report to a linux system, all contents in the report was displayed in Times New Roman font instead of Arial in th PDF ...

Java Refuses to Start - Could not reserve enough space for object heap

Background We have a pool of aproximately 20 linux blades. Some are running Suse, some are running Redhat. ALL share NAS space which contains the following 3 folders: /NAS/app/java - a symlink that points to an installation of a Java JDK. Currently version 1.5.0_10 /NAS/app/lib - a symlink that points to a version of our applicatio...

pre-apend to a text file

I want to pre-append some text a a CSV file that is created by MySQL. Basically I want to add the header information for the rows so when the user opens it in Excel they know what each column is. Whats the best way to do this. I presume there is some easy linux command that can do this? I can also do it in the PHP script. I'd li...

What is the Maximum Java Heap Space for SuSE Linux

This question is related to Java Refuses To Start - Could Not Resrve Enough Space for Object Heap and should be easy enough to figure out. However; my searches haven't yielded anything useful. Essentially we have 2 32 bit OS's (RedHat & SuSE) on different machines with the same hardware. Both use the same JVM both executing the same c...

Problem installing flex-2.5.33.tar.gz on linux (debian); 'make' fails

Hello, I'm trying to install 'flex'. I don't have a previous version of flex installed. I'm running a stripped down version of linux, so I don't have apt-get or yum. To install I untarred the flex package (flex-2.5.33.tar.gz) and ran ./configure (which works). However, then I ran make and it failed. I've attached the output of ./configur...