General :: Process In Background Hogs 96% CPU But When Ran In Foreground Its Almost Zero
May 17, 2010
I am trying to solve one problem: When i run my process in background it hogs around 96% of CPU. But when ran in foreground, CPU utilization is almost zero. Is there any difference b/n a background and a foreground process wrto CPU utilization?
View 8 Replies
ADVERTISEMENT
Mar 5, 2010
is it possible in bash to run one command in background and after it's done show output with less? While background process is running I should be able enter another commands.What I have is this (sleep is only for simulation):
Code:
{({ ( tree / > tree.txt && sleep 2) & } && wait && less tree.txt) &} && wait fg &
Problem is that I don't know and I can't find how to move it to the foreground after completion.
View 14 Replies
View Related
May 18, 2011
q)how can i bring the backgroud process to foreground i tried like below1]hp-linux@hp-linux-desktop:/usr/share$ top
top - 11:28:24 up 1:57, 2 users, load average: 0.55, 0.65, 0.62
Tasks: 158 total, 3 running, 155 sleeping, 0 stopped, 0 zombie
Cpu(s): 6.1%us, 2.9%sy, 0.7%ni, 87.1%id, 3.0%wa, 0.2%hi, 0.1%si, 0.0%st
[code]...
View 4 Replies
View Related
Dec 7, 2010
Is it possible to schedule a process in the foreground? Lets say a cron schedule to be ran at 9:00. I would like to come back at 9:30, see how the process is running, and being able to interact with it... lets say kill it, or whatever. Is it possible? (Its not necessary to use cron, but it must be in Command Line)
View 6 Replies
View Related
Feb 9, 2010
I start a process, put it in the background running, then log out, then log in again, and want to bring the process to front again. I've looked in "ps aux" for the PID, but it won't be put in the foreground with "fg ###". What's the correct way? (I use the same account for both login sessions.)
View 2 Replies
View Related
Jun 16, 2010
I had started a process through ssh and then i did 'cntrl+Z' and 'bg' and 'disown' before closing the ssh connection. That process kept running in the background in the other machine and now i want to bring it back to foreground in that machine. However running the command 'fg %<process_id>' is not helping. What do i DO!?
View 6 Replies
View Related
Dec 30, 2009
I want to set my top gnome-panel's background opacity to about 80, while having foreground opacity (fonts and images) set to 100.
View 1 Replies
View Related
Nov 21, 2010
I got curious during the construction of my program to search for blocks of text that contain certain words, and wanted to print out blocks of text with the words I was searching for, initially, in ALL CAPS and seperated by tabs for easy identification. That got boring, though, so I thought, "Can printf do colors, too?" Yes it can.... Who knew?
[Code],,,
View 8 Replies
View Related
Aug 19, 2009
I've read about this. Everyone says to use ~/.Xresources or ~/.Xdefaults, and it doesn't work for me. It doesn't do anything at all, in fact. I'm trying to use this:
Code:
XTerm*background: black
XTerm*foreground: white
In the ~/.X* files, it won't work. I read that another way of doing it is using
Code:
xrdb -merge .x_settings_file
This will work for me. It's the only thing I can get to work. But when I restart, it will have to be done again. I'm using Slackware 12.2.
View 1 Replies
View Related
Oct 26, 2010
i have ported linux into arm and i want to run two background process on target
i have two c programs a.c and b.c
i have cross compiled them as
arm-linux-gcc -o a a.c
[code]...
View 8 Replies
View Related
Nov 16, 2010
Could you tell me how can I run a process in the background?
View 1 Replies
View Related
Jan 17, 2011
I know of terminating a command with & and then moving it into the background by pressing Ctrl-Z and then bg [pid], and I also know of nohup. But say you started a process that turned out to take much longer than one expected, is there a way of pulling, so to speak, this process from another terminal screen into the background so that even if I log off from the server the process would continue?
View 2 Replies
View Related
Apr 11, 2011
I run
nohup bash -c "while [ true ]; do echo test; done"
from PuTTy SSH client but after this process is not runned in background instead nohup keeps to be foreground process in shell.
SW version: nohup (GNU coreutils) 8.5
View 1 Replies
View Related
Mar 5, 2011
i want to send a running process to background .. normal commands like sleep i can able to move easily to bg .
# sleep 10
#Ctrl+z
#bg
[code]...
View 4 Replies
View Related
Feb 23, 2011
Is there some way to see only the process running in the background?
View 4 Replies
View Related
Jan 14, 2011
Is there any way to run a long process in background so that it still remain in running state even if the user logout the system.
View 12 Replies
View Related
Mar 10, 2011
How do you move a running process to the background? For example, type the command sleep 60 on the command line and try moving that process to the background.
View 1 Replies
View Related
May 30, 2011
How the dhclient retry working(Background Process).
View 3 Replies
View Related
Feb 1, 2010
Because of my English skills I'll try to explain this subject as best I can, thank you for understanding. Fisrt of all, I am running some program on my slackware in background (using standard method - &). I need to make a script, which allows sending command to this process on my machine from another one. Furthermore this program have to be logged out (standard output f.e. ./myprogram > log.out.txt).It might be a separate Program A which runs my Program B but it cannot be screen, because it is not working like I'd like to and it cannot be java, because it's slow and working not the best so to speak
View 6 Replies
View Related
Feb 9, 2011
I have 3 processes to be executed in a particular sequence.
ProcessA
ProcessB
ProcessC
The requirement is that all the processes should run as background processes.
ProcessA talks to ProcessB and ProcessC using sockets.
ProcessB talsk to ProcessA only using sockets.
ProcessC talsk to ProcessA only using sockets.
[Code].....
View 3 Replies
View Related
Aug 26, 2009
I wonder how one can, if at all, run an X program in the background *in an emulator sub-shell process*. What I mean is to launch a program in an emulator, e.g, by xterm -e gedit
but with gedit (in this example) running in the background from inside the xterm sub-process, so that the xterm will accept other commands. In the above, gedit will run in the foreground, and of course, if you do
xterm -e gedit &
then xterm will run in the background, not gedit.In short, I would like to achieve the same thing as "gedit &" as you manually do in xterm, but from another shell. What I aim to do is write an X init script to achieve this result (to have the emulator open and a program or two running from it, in the background, at the X startup).
View 2 Replies
View Related
Oct 5, 2010
The first call to "somefunction" works as expected. The function prints "endfunction" and a process in background sleeps 30 seconds. In the second call I thought it should work in the same way, but the script sleeps 30 seconds before it prints "endfunction".Does someone know the reason of this behavior? Is there another way to do a command substitution of a function that has a background process without have to waiting for that process?
View 2 Replies
View Related
Jun 20, 2010
When I add the line (sleep 5 ) & in the script then the "while read" loop does not read all lines from the file, but only prints the first line.But when I remove the ( sleep 5 ) & from the script, then the script prints all lines as defined in the file.And how to solve the problem? I want to create a new process (for which the sleep is just an example) in the while loop:
$ more test
#!/bin/ksh
while read -r line ; do
[code]....
View 1 Replies
View Related
Feb 16, 2010
How can I run a job in background using putty? I'm try to run yum update but it will take some time. if I close putty the process will interrupt.
View 14 Replies
View Related
Feb 10, 2011
I have a process A running in the background. When I start another process B also in the background, the system hangs the moment I hit any key. Process A and B communicate over a socket. Iam not even able to do a telnet to the system. Is there any precautions that I need to take while running in background
View 1 Replies
View Related
Apr 30, 2011
It's my first post and think not last here. I'm new to Linux system ( had a bit of unix programming at school but forgot already ). Please, take a good care of nooby me Now, let's get to the point
I have CentOS installed on one of my machnce, its my PHP development server. I also wanted to run a Minecraft server on it. I would like to skip autostart with init.d thing and be able to control it's run manually, but remotely. Thing is, when i log via putty to server and start server the server output is in terminal. When I close puty, ran application closes also. So I need to have putty window ran all the time.
So, since many programs can be run as background task (like httpd). Is there a way to log via putty. Start application and send it to process... log out of putty ( and application doesn't shut down with putty)?
Also, would be nice if I was possible to log to putty and switch to that application, so i could see server output, info and Issue commands. Basically, I want to start a service and be able to manage it via putty. and not close it when i terminate putty.
PS: I have installed Windows on CentOS server. Is there a way to issue a system start without loading whole GUI thing? When I was installing it I thought it would be easier to manage it with GUI, but now loading it only eats system resources and i unplugged monitor and mouse nad manage it only from Putty
View 9 Replies
View Related
Feb 16, 2011
I am running Ubuntu 10.10, and I am trying to run a java process in the background of a terminal, so I can continue to use that terminal.
Other applications will run in the background just fine, but when I run my java application, I cannot change the status of the process from "Stopped" after suspending it.
Here is my command syntax, along with some commands I have tried and their outputs:
There were [1]- entries, but I removed them for simplicity.
View 4 Replies
View Related
May 18, 2011
I am doing a program that reads data from a gps and some other devices and writes some files with all the information. When I run it normally it works fine, but if I run the program in the background (with the ampersand) files are not created until I bring it to foreground or close it. I am confused, the program should run the same way with and without the ampersand. (Could it be that the main process that creates all the threads does not create them when it is executed in background? It seems like if the program is stopped until I take it to the foreground).
View 4 Replies
View Related
Jun 7, 2011
I am using a program that reads in data from a serial port and then sends that data out over a TCP connection. The problem I'm having is that the only way I know to exit the program is to do a 'kill PID', but doing this means the program doesn't go through the motions of closing the TCP connection properly so I have to wait some random period of time for the port to free itself or else when I try to start it back up it tells me that it can't bind to the specified port.The general structure of the program is as follows
Code:
int main(){
// initialize some stuff
[code]...
View 1 Replies
View Related
Apr 23, 2011
I'm using cron to run a tunnel. It is a looped script which never exits, and thats why I don't want cron to wait for it. This is a crontab entry:@reboot $HOME/cron/portfw.sh &When I run it manually, everything is ok. But when cron runs it, a defunct sh process keeps running until portfw.sh and it's child are killed. Somehow cron knows that processes spawned in background and keeps waiting for them and ignoring the fact that parent process exited. I tried using setsid to change spawned process group, but it did not full cron, it still knows about child processes
View 9 Replies
View Related