Programming :: Shut Downing Running Process
Apr 15, 2009
I need a help regarding ,how to shutdown the running process using C program?..here i attached the porgram to shutdown the system by c program is there any possible to change in this program to shutdown the process?
View 1 Replies
ADVERTISEMENT
Oct 13, 2009
Offlate I installed F11 i586 on my laptop. F11 shares the hard disk with Vista Home Premium 32-bit. The problem is that when running F11 (or even Ubuntu), my system shut off suddenly(not a normal OS shut down, but a sudden power off without any warning). This could have been a hardware trouble(heating) but it doesn't happen with Vista.
Machine specifications:
Maker: Toshiba
Model: Satellite L305D-S5881
AMD Turion X2 Dual Core Mobile Processor RM-70
3072 MB 800 MHz SDRAM
I don't want to open up my machine unnecessarily, if it isn't a hardware issue.
I am not sure how to verify the bit length of the machine and the OS and does it create a compatibility issue ?
Your advise would be highly appreciated.
Raman
View 3 Replies
View Related
Jan 27, 2010
How to get list of threads of a process using C code in Linux?
View 6 Replies
View Related
Sep 7, 2010
In the comments section of this blog, the commenter "Pratik" claims that you can edit a running bash script, without killing it, and have the changes picked up by the running script. He claims you can do this by editing files in /proc. Now, I know how to find the /proc folder that contains the data on the running process, Code: cd /proc/`pgrep process_name` But I can't figure out what I should do if I want to edit a running bash script.
View 6 Replies
View Related
Jul 11, 2011
I have a requirement where I want to extract the full name of the process running in my box. I tired various options of ps. The wide option gave me the full command but that contains command, the interpreter and also the arguments passed.
Code:
XX XX XX XX XX XX /usr/bin/sh /path/to/exe/myexe.sh arg1 arg2 arg3.
Is there any way from ps or any other command I can extract the full name of the command
Desired Output :
Code:
/path/to/exe/myexe.sh or myexe.sh
View 12 Replies
View Related
Aug 18, 2009
is there a way for me to grep the process that running more than 30 days only using linux command or script?
example:i do ps -ef to list out the process, then i want to filter only the process that always running more than 30 days..
View 8 Replies
View Related
Aug 18, 2009
I have p1,p2,p3,p4 some processes created by me in C. p1, p2, p3 are started individually from several consoles. And I want process p4 to terminates processes p1, p2, p3 if they are running. Which is the easiest way to accomplish that? put all processes in the same process group and send from p4 a kill signal to the group. But I couldn't do that because I cannot call successfully setpgid(getpid(), 15000) from p1-p4. It's there some way to put them in the same group? the processes don't have a child-parent relationship, they are launched manually from consoles.
View 1 Replies
View Related
Feb 16, 2010
I am working in HP UNIX. I have one process which is running continuously.There is log file generated for the process. I want to take back up of file without loosing any logs after particular interval of time or say file size increases more that 1GB.
View 3 Replies
View Related
Dec 4, 2010
It's called TextRipper and it creates indexable and editable text files from any image. Feel free to copy TextRipper; it's licenced under GPL. My troubles are with cracking passworded pdf's. (As you can see, I meant any when I said any image.)
I can't find a way for the user to cancel the decryption process by exiting the script without pdfcrack orphaning. Line 349 works the rest of the time; the concerned process is line 228. I believe it's a piping/subshell problem. At least that's how I've been going at it in vain.
I've made portability a priority and that the comments still require updating.
Code:
If the result is one output file, TextRipper will open it for you in OpenOffice Writer.
Otherwise all txt output files (editable and indexable) will be in the original file's directory." 0 0
View 14 Replies
View Related
Feb 10, 2011
I have an ubuntu 10.10 server and want to run a script on it to check if a process is running. If it is not running, it will start the process and also write into a log file.
When running the script i get the following error message:
syntax error near unexpected token `else'
Here is my script.
View 7 Replies
View Related
Apr 27, 2010
Assume someone bind a particular process to a particular CPU core(In multi core machine) by using sched_setaffinity() like functions. Then how we can get that process running core id and CPU core utilisation of that process on that running CPU core(Pragmatically or by a Linux command)?.
View 5 Replies
View Related
Jun 10, 2009
I want to run a bash script when my pc shut down. Suppose the script is myscript.sh How can I do this ?
View 4 Replies
View Related
Aug 6, 2010
Sometimes I connect to my Debian box from another computer (using SSH on Cygwin or Linux), and once ina while I want to run some console apps. And sometimes some of these apps might complain about "another intance, Error: an instance of newsbeuter is already running (PID: 2496)". Is there a work around for this issue at all(without killing the original instance") ? The reason I do not want to kill the app because there might be 2 users connected to the same machine that might be using the same app.
View 1 Replies
View Related
May 27, 2011
It's really weird, some applications simply don't start up. Skype for one, just shuts down before logging in, and Calibre shuts down instantly, when I try to run it. I've tried to remove and re-install it, but that doesn't do any good.
View 2 Replies
View Related
Sep 3, 2010
I recently got my laptop setup as an Ubuntu machine, but if I just leave it running, after a while I'll look over and see that it has shut down. I have gone through the power management options and I do not see anything there regarding this. So I was wondering if this is a feature in the 10.04 version?
View 3 Replies
View Related
May 20, 2009
I have managed to configure a wireles PCI card on CentOS 5.3 and it seems to work fine. It is a off brand (Hercules) with a Ralink RT61 chipset. I installed the most current driver (RT2501PCI/mPCI/CB(RT61:RT2561/RT2561S/RT2661) from the rt2x00 Open Source Project. I now have a question that might be very simple for one or more of you to answer. When I issue the command "shutdown -h now", the machine starts to come down and brings down eth0 cleanly, but when it attempts to bring down wlan0, the machine hangs and never brings down the interface OR powers off the box. The only way to complete the power off is to "hard" power off the machine.
View 7 Replies
View Related
Nov 9, 2010
I have a shell script to identify whether the process is running or not. If the process is not running, then I execute another script file to run my application. Below is my script and saved this script as monitorprocess.sh Code: #!/bin/bash
result=$(ps -ef | grep -v grep | grep "applicationname.sh" | awk '{print $2}')
echo $result
if [ "$result" == "" ];
[code]...
View 4 Replies
View Related
Mar 31, 2011
Is there any difference in cpu usage for process in init.rc(runs automatic when boot is happened) and manually running process. Will these both have same priority by default...?
View 1 Replies
View Related
Nov 26, 2008
I tried googling but didn't get any answer for this.I have a process called "abc" and it is running with PID "123".I have a putty session opened with PID "999".I am giving kill -TERM 123 from putty session.My process "abc" before dying it should catch the PID of the terminal which provided TERM signal to it.Is there any way to find this out
View 2 Replies
View Related
Jan 30, 2011
I tried to install suse 11.3 but every time the system shut down in the install process it never finish
I think that the FAN does not work
I have an Acer Aspire 5720z
View 3 Replies
View Related
Nov 9, 2010
I have a shell script to identify whether the process is running or not. If the process is not running, then I execute another script file to run my application. Below is my script and saved this script as monitorprocess.sh
Code:
#!/bin/bash
result=$(ps -ef | grep -v grep | grep "applicationname.sh" | awk '{print $2}')
[code]...
View 14 Replies
View Related
Nov 20, 2009
I installed Fedora 12 and after I wantd to shut down the system. I waited but fedora not going to shut down. I got black screen with Power Down
View 7 Replies
View Related
Mar 10, 2011
I want to kill parent process after "fork()" method. but if I kill parent process with "exit(0)" method, main() thread is terminated as well so child prosess doesn't work anymore. Is there any way to kill only parent process without affecting to child process?
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
[code]....
View 1 Replies
View Related
Dec 7, 2009
Consider the following code:
Code:
int main()
{
int i=0;
pid_t pid;
for(i=0;i<2;i++)
[code]....
I get the following output:
Parent: chid_pid=4356 i=0 parent's pid=4355
This is child 4356 i=0
This is child 4357 i=1
[code]....
I can observe instead of two children(as I expect) processes there are three. This is because child process 4356 creates its own child. Why all the messages of the type "This is child X i=Y" are concentrated one under another? How exactly fork works? Is affected by the fact that I have a dual-core processor?
View 3 Replies
View Related
May 21, 2010
I recenlty set up a headless linux home server by my router will my spare computer parts. I have NFS and even a COD4 server running on it for my friends and me. Because the box is headless, I take controll over it with ssh and start the COD4 server from there, but the problem is, if I close the terminal I have the ssh running from, it closes my server, meaning my desktop needs to be up and running the entire time. That kinda ruins the point of my server
So my question is, is there a way for me to run the command so that it will not close with the terminal AND that I can still send commands to the server.
View 9 Replies
View Related
Apr 8, 2009
How do I figure out which CPU's a process has used recently or is currently using?
View 2 Replies
View Related
Sep 28, 2010
i want a process that can operate as both a TCP echo server and a UDP echo server. The process can provide service to many clients at the same time, but involves a single process that does not start up any other threads.
View 3 Replies
View Related
Nov 10, 2010
Is it possible, using ps, to determine where a process is running from? I have two applications, both are identical and running in parallel directories, such as /app1/start.sh and /app2/start.sh. If I run ps -ef then I'm unable to tell the difference between the two
Using ps (or alternative), how can I tell that PID 123 belongs to app1?
View 3 Replies
View Related
Feb 10, 2011
Is there a way for me to tell cron to run an app BUT not run it if a process exist already?
View 5 Replies
View Related
Mar 5, 2010
I am running an Lamp ubuntu 9.10 server and are all these processes supposed to be running?
Memory:
1829 www-data 209080 kB /usr/sbin/apache2 -k start
2052 www-data 207560 kB /usr/sbin/apache2 -k start
[code]....
View 3 Replies
View Related