Programming :: Getting A Snapshot Of A Running Program?
Nov 17, 2008
I am trying to use perl to run a program using the eval command but the program runs infinitely, i just need it to run basically for one second, stop then give me the output. I tried using fork but it does not really work. The child process is not being killed.
my $pid = fork;
if ($pid == 0) {
my $results = `ngrep etc...`;
[code]...
View 6 Replies
ADVERTISEMENT
Sep 18, 2010
i want to run c graphics program on linux for that i want to install[URL]but i dont know how to install this graphic file on linux to make it un.
View 1 Replies
View Related
Mar 27, 2011
I have a script that calls another program/script, xxx, to run in the background. Supposedly this program at most should finish within five (5) minutes so after five (5) minutes, I run some other steps to run the script into completion. My problem is sometimes the program takes longer than five (5) minutes and this is causing problems when running the rest of the steps in the scripts. Can anyone suggest how to re-program my script. At the moment, the KSH script, i.e. test.ksh, is doing as below:
test.ksh:
.....
.....
xxx/xxx.ksh <--- program/script called by the script
sleep 300
..... run the rest of the script .....
..... problem is sometimes xxx/xxx.ksh takes longer than 300 seconds .....
..... any way that I can monitor that xxx/xxx.ksh finishes before I run .....
..... the rest of the scripts .....
View 3 Replies
View Related
Jan 24, 2009
I'm looking for a way to detect whether or not a program has been called from pipe, e.g.
Code:
whatever | my_program
versus simply just being exectuated directly:
Code:
my_program
Why? In the first case, I want to run the program non-interactively, and in the latter case I want to print out user-friendly messages. I've been thinking along the lines of some check I haven't yet found, like:
Code:
if( stream_buffer_is_not_empty() )
print_interactive_messages();
View 1 Replies
View Related
Mar 3, 2009
I would like to know if there is a linux command to verify the amount of memory used by a program. The programs I am using were compiled with gfortran.
View 2 Replies
View Related
Mar 2, 2010
The situation is that I have an MPI-parallel fortran program. I run it and it's distributed on N processors, and each of these processes must call an external program.
This external program is also an MPI program, however I want to run it in serial, on the processor that is calling it, as if it were part of the fortran program. The fortran program waits until the external program has completed, and then continues.
The problem is that this external program seems to run on any processor, and not necessarily the (now idle) processor that called it.
how I can call the program and ensure it runs only on this processor?
Extra information that might be helpful:
If I simply run the external program from the command line (ie, type "/path/myprogram.ex <enter>"), it runs fine. If I run it within the fortran program by calling it via
CALL SYSTEM("/path/myprogram.ex")
it doesn't run at all (doesn't even start) and everything crashes. I don't know why this is.
If I call it using mpiexec:
CALL SYSTEM("mpiexec -n 1 /path/myprogram.ex")
then it does work, but I get the problem that it can go on any node.
View 2 Replies
View Related
Sep 22, 2010
I'm trying to test whether wget is working still or not. While [ wget is still running ] <----- but how should this look please?
do
codes
done
View 4 Replies
View Related
Jul 14, 2011
Running a program with arguments using a shell script
View 1 Replies
View Related
Jan 13, 2010
My requirement is to save files before shutting the Linux machine down, unattended ie: when the user is not near the machine. This is done whenever the UPS battery is about to die, so that the files get saved. open-Office/text-editor applications that can be saved using keystrokes will have to be found from the running processes and keystrokes should be sent to them from a C program that was started in non-graphics stage. ie: from a C program that forks into memory as a daemon before xwindows part starts. How to I send keystrokes to a running application? (like cotrol + F and then wait and then send next set of keystrokes till the file is saved as a new file or as the same file itself), either from C program or a script?
View 1 Replies
View Related
Jun 28, 2013
I have a java program that runs on Debian as a background processor. Yesterday the Java program stopped running. I looked at the memory usage, the system only had 5MB memory left, so my guess is that the java program ran out of memory to use.
However, after we restarted the java program, we could see that the free memory count started to go up. It kept going up from 5MB to over 400MB. The increase of memory happened slowly, when I measured it, I could see that with each minute passing by, there were a bit more memory added into the free memory pool, and meanwhile, the java background process was running.
I wonder why this would ever happen. It's as if our java program first brought the machine done because it consumed all the memories, then after restart, it starts to give back memories.
View 2 Replies
View Related
Jul 26, 2010
I presume there is something in the JWM window manager - or Puppy Linux Lupu 5.01 itself that is conflicting with the normal loading of GMPLAYER....
I would like to know how to troubleshoot, and fix this problem if possible (even a workaround would be great).
View 1 Replies
View Related
Feb 15, 2011
I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html
My code to get url's radio country.htm is:
Code:
View 2 Replies
View Related
Jan 15, 2010
Ok so Basically i have 2 questions
1. i know how to create a file with c++ using but is there a way to save it to a specific location on your computer with windows and linux
Code:
2. i need to know how to run/execute/open a file in a c++ program im using and its not working
Code:
View 4 Replies
View Related
Sep 4, 2009
Is suid disabled from running all home made bash scripts or just from running them as root or:
Who would know for sure.
I googled several combinations of Mandriva Linux how-to suid disabled setUID etc... so far all I found was "many distributions are disabling suid for security reasons" nothing specific.
View 2 Replies
View Related
Jun 1, 2010
My root Vixie cron crontab is set to perform a system snapshot via fsarchiver: 0 0 * * * fsarchiver savefs -o -A /backups/p30_root.fsa /dev/sda2 /dev/sda3 The command itself works fine, generating about a 7G snapshot of my Suse server. I then wish to rsync this to a NAS I have located in another building: 0 3 * * * rsync -av -e ssh --delete /backups/ root{at address}:/DataVolume/os_backups/
(yes, I'm rsyncing as root. I absolutely loathe it, but I got thrown into an quasi-SA position with a ridiculous to-do list and no time to do it. I'm having to make things just work and then go back and try to improve them/learn how. I couldn't make it work in a non-root way quick enough, so for now I'm having to cron rsync jobs as root because of all the differing file permissions on this samba/MySql server. I set the NAS to only accepts ssh from the server IP, and we're behind a campus firewall... It's serious trial by fire.) The crontab also has rsync commands for the samba areas, our specialized chemistry software and affiliated MySQL databases............
View 2 Replies
View Related
Mar 18, 2010
Need to take a snapshot of my desktop to post in a vmware forum.
my os is opensuse 11.1 with kde
View 7 Replies
View Related
Oct 14, 2010
Just lost my harddrive. Bought a new one, installing Ubuntu 10.10. I would like to installa a couple of programs after my installation, wanting to use the machine to develop programs - so I am going to install Eclipse and Glassfish and tomcat and such.
When I am done with that I would like to take some kind of snapshot and burn to a disc. So if a crash comes visiting me again, then I am able to install my basics. This would save me from those boring moments in live.
Can I take a 'snapshot' of my installation, Could I then restore this in some easy way ?
View 3 Replies
View Related
Mar 22, 2010
I want to make a snapshot of RHEL5 about my current situation ,how will I do that ?
View 3 Replies
View Related
Apr 21, 2011
I use the RH Linux 5 and it contains some tools/software like swig, python etc. But the version of these tools are lower than what I want. So I am going to install the tools with higher version on it. Before I do this I will make a snapshot first so if something goes wrong, I cat restore the system.I've heard the most easy way to do this is make a snapshot. Someone know how to do this?
View 1 Replies
View Related
Nov 4, 2010
I installed an RPG platform (Fantasy Grounds) on my system via Win7. Once installed, and known to be working, I logged off Win and back to Ubuntu and ran the program via Wine. Once it starts, I hear my PC rev up, see the system monitor crank up the CPU and see that "Fantasy Grounds" is running and using about 40% of my CPU usage... but I don't see it. There is no GUI, no nothing. I can end process and the CPU drops down to normal. Anyone have any idea as to why a program would be running, but I have no visible evidence that it is?
View 2 Replies
View Related
Sep 1, 2011
Is there a possiblity to load your host snapshot into a virtualmachine and how?
Which vm would you use?
KVM or virtualbox or others?
View 2 Replies
View Related
Dec 22, 2010
I started to use Debian Live about three months ago. I can't get snapshot to work correctly. Each time the system boots or shutdown, the system over-writes the persistent file. I'm currently have to use the live-snapshot command to make a snapshot. Make a copy of the file for a backup. Then I have to boot my system and make a copy of the backup and rename the file the correctly. Turn off my laptop (not shutdown). then restart it for the persistent to work. Must be a easier way.I have three partitions: debian-live (/dev/sdb1), live-sn(/dev/sdb2), and home-rw (/dev/sdb3) on a 8 gig usb flash drive.
View 1 Replies
View Related
Jul 19, 2010
I have a lot of data on a nfs store external to an Ubuntu machine. I've had problems with the storage becoming full and have spent a very long time deleting files to get absolutely nowhere! Over 25GB of deletions on the 80GB disk has only cleared 1.5GB of space...
You can see below the hidden .snapshot directory, the disk usage for the nfs-store is coming out at 97GB when the disk is only 80GB in size, and the two directories I want on the disk are about 22GB in size.The .snapshot directory appears to have been made on Friday, I'd like to know if I can:
1) find out what command ran to create/update it
2) re-run the command to update the directory or remove the directory
Code:
ideasadmin@ideasadmin-desktop:/nfs-store$ ls -la
total 20
drwxr-xr-x 5 500 500 4096 2010-07-16 17:35 .
[code]......
View 3 Replies
View Related
May 2, 2011
I am trying to run open a GUI program on a remote Ubuntu machine using ssh.
I want to open, lets say firefox or skype, on a machine I have connected to via ssh.
But when writing logging in with user2 and writing sudo -u user1 firefox I get an error message saying no display specified.
The machine is turned on and logged in with user1, it just appears that i cant get ubuntu to recognize that there is a GUI available.
View 1 Replies
View Related
Jan 16, 2010
Here's the error message I get when trying to run Thunderbird 3.Thunderbird is already running, but is not responding. To open a new window, you must first close the existing Thunderbird process, or restart your system.I can't find it running anywhere.
View 9 Replies
View Related
Mar 25, 2010
I seem to be having a problem with cron. I have a python program that checks a specific directory for pending email scripts written in python.
Code:
#!/usr/bin/python
import os
emaildir = os.environ['HOME']+"/email/"
filelist = os.listdir(emaildir)
for pyfile in filelist:
if pyfile.find(".py") > -1:
execfile(emaildir+pyfile)
This code has been tested and works fine. The problem is that I need cron to run this code every 5 minutes but i can't tell if it is running: Here is my cron code:
5 * * * * /home/username/custom/CheckEmail.py >>/home/username/custom/email.log 2>&1
I activated the log (I think) but all i get is /var/log/cron.log and that only logs when I activate/deactivate or edit the cron file. is there anything else i need to set for this to work? I am running Ubuntu 9.10.
View 8 Replies
View Related
Jul 15, 2010
I downloaded The Witcher for windows from Wine and I'm trying to run it but it says I have to run it as the admin the first time the game is ran. I don't know how to run it as admin lol. I've only been using ubuntu for about a week now. If you can let me know how to do it from the terminal AND from shortcuts, that would be great because I'm trying to know what all I can do with ubuntu.
View 6 Replies
View Related
Jan 14, 2011
Is there a file that can be opened and a program name searched for? If it is there, the program is running, else it is not.
Something like that?
I have a program that stops periodically. If I could run a script every 30 minutes or so to check the hypothetical file, it could re-start the program if the program had stopped running.
View 2 Replies
View Related
Feb 20, 2011
I want to use a program, that runs windows and "linux with mono". I run Kubuntu 10.10.
Quote:
koen@Koen-Kubuntu:~/Documents/Software/SuperOneClick_1_6_5$ mono SuperOneClick.exe
** (SuperOneClick.exe:4191): WARNING **: The following assembly referenced from /home/koen/Documents/Software/SuperOneClick_1_6_5/SuperOneClick.exe could not be loaded:
[Code]....
View 1 Replies
View Related
Apr 10, 2011
i am trying to daemonize my (java) program on ubuntu. For that end i created a script based on /etc/init.d/skeleton script which obviously uses start-stop-daemon.
But I cannot make the process (java program) run on the background. it keeps running in the same terminal i start my daemon script. Trying --background option for start-stop-daemon does not help.
View 5 Replies
View Related