linux

Which Linux IPC technique to use?

We are still in the design-phase of our project but we are thinking of having three separate processes on an embedded Linux kernel. One of the processes with be a communications module which handles all communications to and from the device through various mediums. The other two processes will need to be able to send/receive messages ...

Anyone use libtool as backend for scons?

I'm interested in examples. ...

write-through RAM disk, or massive caching of file system?

I have a program that is very heavily hitting the file system, reading and writing to a set of working files. The files are several gigabytes in size, but not so large as to not fit on a RAM-disk. The machines this program runs on are typically Ubuntu Linux boxes. Is there a way to configure the file manager to have a very very large...

C++: Getting incorrect file size

I'm using Linux and C++. I have a binary file with a size of 210732 bytes, but the size reported with seekg/tellg is 210728. I get the following information from ls-la, i.e., 210732 bytes: -rw-rw-r-- 1 pjs pjs 210732 Feb 17 10:25 output.osr And with the following code snippet, I get 210728: std::ifstream handle; handle.open("outp...

Get IP address of an interface on linux

How can I get the IPv4 address of an interface in linux from C code ? e.g. I'd like to get the IP address(if any) assigned to eth0 ...

Can you use RPM to distribute a *.bin file

Hi, I've never had to do this and I'm not really sure you can do it or not. But can I use RPM to distribute an already created *.bin file (a Linux self extracting binary files). My scenario is this, we use RPM to distribute all of our software. I have a piece of vendor software thats already a bin file. Say myapp.bin. I would like to us...

Where are possible locations of queueing/buffering delays in Linux multicast?

We make heavy use of multicasting messaging across many Linux servers on a LAN. We are seeing a lot of delays. We basically send an enormous number of small packages. We are more concerned with latency than throughput. The machines are all modern, multi-core (at least four, generally eight, 16 if you count hyperthreading) machines, a...

The origin of using # as a comment in Python?

So I just had like this mental explosion dude! I was looking at my Python source code and was reading some comments and then I looked a the comments again. When I came across this: #!/usr/bin/env python # A regular comment Which made me wonder, was # chosen as the symbol to start a comment because it would allow the python program to ...

Terminal: Opening the current path in a window?

Often times, I find myself navigating very deep into a directory and wanting to open the graphical window (nautilus) for various reasons. So the question is simple: After doing, cd sampledirectory cd sampledirectory2 How can I open this location in a GUI? ...

how can i create a corrupt file with specified file size in linux ?

how can i create a corrupt file with specified size ? corrupt as in make a empty file or take an actual file and corrupting it so it becomes unreadable. ...

Crypt type identification /etc/shadow

I know that the password field in /etc/shadow is prefixed with ${number}$ if it is not simply DES encrypted. What I am not able to find is a table that correlates the type of encryption to a given number. For instance, $1$ would indicate MD5. Its the rest that escape me (i.e. SHA1, SHA256, Twofish, Blowfish, etc) I've gone through the ...

Linux 64 bit machine java.lang:type=MemoryPool,name=Perm Gen [shared-rw],java.lang:type=MemoryPool,name=Perm Gen [shared-ro] not listed in JConsole

I m running a Java Application in Linux Fedora OS 64 bit machine.I connected jconsole to Remote JMX port of JDK application . I dont see MBeans java.lang:type=MemoryPool,name=Perm Gen [shared-ro], java.lang:type=MemoryPool,name=Perm Gen [shared-rw] .I dont see Perm Gen(Shared RO) Perm Gen(Shared RW) Graphs and values under Memory Tab.I...

How to perform atomic operations on Linux?

Every Modern OS provides today some atomic operations: Windows has Interlocked* API FreeBSD has <machine/atomic.h> Solaris has <atomic.h> Mac OS X has <libkern/OSAtomic.h> Anything like that for Linux? I need it to work on most Linux supported platforms including: x86, x86_64 and arm. I need it to work on at least GCC and Intel C...

How to recover deleted faxs in hylafax using AvantFax

Hi I'm using AvantFax for HylaFax, can someone tell me how to recover\restore deleted faxs from "Recycle bin" if there any. ...

Customize android?

Question, I have a HTC Hero with Android 1.5. The buggy (speed <= 10 kb) network driver bothers me since a long time. (I saw it can serve 50 kb/s or more, but only temporarely, but then, after a few seconds, it slows down to < 5kb/s and takes about an hour to come back to 50 kb/s...) Now HTC is working on 2.1, but whatever... I don't k...

Using desktop as canvas on linux

Hello everybody, i was wondering if somebody could help me out. I have a plan of making clone of geek tools for linux. But i have no idea if you can somehow use linux desktop as canvas for drawing text etc. I tried to google it up but i found nothing. What i need to do is basically be able to draw text on certain parts of desktop so it ...

converting .doc and .xls file to html on rhel 4 server using php

i have a rhel 4 server and use php as a server side scripting language. There are many doc and excel files that are uploaded to the server daily. i make these files to be downloaded. i want to implement the view as html feature and they should preserve the formatting also. so which tools can be used or it can be done through php only. (o...

Is there a piece of secret data in a Linux user account?

I want my application (PHP, but that shouldn't matter) to store some data in a shared repository (the APC user cache, but again irrelevant). To prevent users from reading eachother's data I'd like to encrypt it per user. I could have the user specify the key in his configuration file for the application, but I'd rather generate it autom...

How to monitor Linux UDP buffer available space?

I have a java app on linux which opens UDP socket and waits for messages. After couple of hours under heavy load, there is a packet loss, i.e. the packets are received by kernel but not by my app (we see the lost packets in sniffer, we see UDP packets lost in netstat, we don't see those packets in our app logs). We tried enlarging sock...

How to share a linked list between two processes?

I have two processes and i want to share a linked list between them. One of the processes is just going to read the list while other process is going to modify the list ( add/delete entries). Can you tell me how to achieve it? Let me add more details to it the language is C and the platform is Linux. It seems that shared memory is o...