Is there a way we can record memory footprint? In a way that
after the process has finish we still can have access to it.
The typical way I check memory footprint is this:
$ cat /proc/PID/status
But in no way it exist after the process has finished.
...
I need to check if my Qt GUI application is already running in the current X session.
That is, I want to forbid running several instances of it. But running several instances by
different users or by the same user on another (i.e. remote) X server should be allowed.
How can this be done?
Thank you.
...
I need to convert some files to UTF-8 because they're being outputted in an otherwise UTF-8 site and the content looks a little fugly at times.
I can either do this now or I can do it as they're read in (through PHP, just using fopen, nothing fancy). Any suggestions welcome.
...
I need a C/C++ API that allows me to list the running processes on a Linux system, and list the files each process has open.
I do not want to end up reading the /proc/ file system directly.
Can anyone think of a way to do this?
...
I am aware that on most GNU/Linux systems, GCC can be invoked by the name "cc" from the command line (as opposed to "gcc"). What I am wondering is if there is any difference in GCC's behavior when it is invoked one way versus the other.
For example, I know that invoking GCC through the name "g++" instead of "gcc" causes GCC to behave di...
I'm debugging communications with a serial device, and I need to see all the data flowing both directions.
It seems like this should be easy on Linux, where the serial port is represented by a file. Is there some way that I can do a sort of "bi-directional tee", where I tell my program to connect to a pipe that copies the data to a fil...
How do I pass the command line arguments to an alias. Here is a sample:
alias mkcd='mkdir $1; cd $1;'
But in this case the $xx is getting translated at the alias creatin time and not at the runtime. I have, however, created a workaround using a shell function (after googling a little) like below:
function mkcd(){
mkdir $1;
cd...
I have used netbeans before with svn, and I liked how it showed me what I had changed since last commit, using the coloring in the left margin.
Can Elipse do the same?
I have installed svnclipse....
...
I have a web project for which I need to run a command when a specific URL is requested, but that command requires root privileges.
The project is served with a Python process (Django), of course running it with root privileges is not an option.
The command's parameters are hardcoded making it impossible to inject anything and it's a r...
I know that information exchange can happen via following interfaces between kernel and user space programs
system calls
ioctls
/proc & /sys
netlink
I want to find out
If I have missed any other interface?
Which one of them is the fastest way to exchange large amounts of data?
(and if there is any document/mail/explanation supporti...
I'm having a linking problem. I need to link against a shared library libfoo.so that depends on a function read which I would like to define myself in the file read.c.
I compile and link everything together but at runtime I get the error
/home/bar/src/libfoo.so: undefined symbol: sread.
nm reports the symbol is defined
$nm baz | g...
Suppose the PID of the process is already known
...
I am wondering if anyone has a working startup script (/etc/init.d/varnish) for Varnishd that works on Ubuntu Hardy. It should set a pid file so it can be monitored. I have been looking all over Google but have yet to find something that works without hacking which I don't have time to do for a few days.
...
Could someone give me an example of a .htaccess that would remove www from http:// and https:// ?
I want to remove the www from BOTH ssl & www:80
...
On Ubuntu, I have a bunch of files in a tree all called 'output.txt'. For each file I want to sort the lines alphabetically with 'sort'. I considered
find . -name output.txt -exec sort{} \;
but this outputs the sorted lines to the console rather than updating the original files which is what I want.
...
--edit--
What application development frameworks/component models for Linux and Mac OS X are analogous to Windows Communication Foundation & COM, which provide high level IPC mechanisms for manipulating/communicating with software applications?
By high level communication model I mean RPC, publish/subscribe, etc.
I'm writing software ...
I have recently been receiving the following error whenever I am asked to supply the host username and password in Oracle DataGuard's Enterprise Manager (EM) tool: RemoteOperationException: Error reading error from command. Any configuration or management that needs to be performed and requires the host credentials is throwing this error...
I have not having any luck getting my .htaccess with mod_rewrite working. Basically all I am trying to do is remove 'www' from "http://www.example.com" and "https://www.example.com".
If there is anything I am missing (conf files, etc let me know I willl update this)
Here is my .htaccess file (located @ /var/www/site/trunk/html/)
Opti...
Is it possible to specify a time range so that rsync only operates on recently changed files.
I'm writing a script to backup recently added files over SSH and rsync seems like an efficient solution. My problem is that my source directories contain a huge backlog of older files which I have no interest in backing up.
The only solution I...
I have a badly behaving process (launched via a user command) which keeps dying at erratic intervals, and I need it to stay alive till I manually kill it. Here is my straight, but probably stupid solution:
#!/bin/bash
if [ -z $1 ]
then
echo "Usage: /s98ize.sh <process name>"
exit
fi
#start of the 'polling' loop
while [ 1 ]
do
pgre...