05-12-2005
Could be that the process dies. Or maybe it execs something else. Or maybe it renames itself. Are you using a job control shell? The command "./omniNames -start 9988&" should then result in something like: "[1] 1234" where 1234 is the pid of the process. Without job control, if your shell uses bourne-like syntax then "echo $!" should give you the pid. Then do "ps -fp 1234" or whatever.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a shell scripting. This will take 7 digit number in each line and add 7 digit number with next subsequent lines ( normal addition ).
Eg:
0000001
0000220
0001235
0000022
0000023
...........
.........
........
Like this i am having around 1500000 records. After adding... (23 Replies)
Discussion started by: thambi
23 Replies
2. Shell Programming and Scripting
Hi all,
I am very new to shell scripting.I have the requirement like
one program is there, if it is running leave like that only and if it is stopped it has to be restart and once again keep watching and it is stopped we a have to restart once agian.I want a shell script for this.Please help me... (10 Replies)
Discussion started by: bhas85
10 Replies
3. UNIX for Dummies Questions & Answers
In LINUX(CentOS, RedHat) is there a way to have the banner statement appear before the logon instead of after the logon? In UNIX and Windows the banner appears before a person actually logs on, what I'm seeing in LINUX is that it appears after the login(ftp, telnet, SSH).
Thanks (0 Replies)
Discussion started by: ejjones
0 Replies
4. Solaris
hi ,
I have a Solaris server which is part of a domain. The IP for this Solaris box is allocated dyanamically by a DHCP. Everytime the solaris box is restarted the IP gets changed. Being an admin what should i do to find the new ip of the Solaris server sitting at my location? Till now i get... (2 Replies)
Discussion started by: BalajiUthira
2 Replies
5. Shell Programming and Scripting
I want to copy large amount of files aproximately more than 20,000 files from one file system to another file system, but it gives me error like:
#cd /opt/appserver/images
#cp * /opt/appserver02/public/images
Argument list is too long
Also above mention error appear again when i run:
... (1 Reply)
Discussion started by: telnor
1 Replies
6. Shell Programming and Scripting
Hello everyone, I'm in need of some assistance. I'm currently enrolled in an introductory UNIX shell programming course and, well halfway through the semester, we are receiving our first actual assignment. I've somewhat realized now that I've fallen behind, and I'm working to get caught up, but for... (1 Reply)
Discussion started by: MrMagoo22
1 Replies
7. Shell Programming and Scripting
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies
8. Shell Programming and Scripting
Hi,
when i am trying below script
assume that below values are taken in code
#!/bin/ksh
if
then
echo usage: aNlist.sh QMGR NAME MQREQ
fi
NL=`echo 'dis qmgr'|runmqsc $1|grep REPOSNL|sed 's/.*REPOSNL\(.*\).*/\1/' |cut -d'(' -f2|cut -d')' -f1`
echo 'define nl('$NL_$2')... (25 Replies)
Discussion started by: darling
25 Replies
9. Shell Programming and Scripting
Hi All,
I have a small queries to get the character count
i tried with wc -c and wc -m but its not returend current result
For eg:
wc -c
wc -m
echo "Name" | wc -c
result: 5 but actually it should returned 4
Help me on this to ge the correct one.
Thanks!
----------... (4 Replies)
Discussion started by: siva.pitchai
4 Replies
LEARN ABOUT DEBIAN
cpulimit
CPULIMIT(1) User commands CPULIMIT(1)
NAME
cpulimit -- limits the CPU usage of a process
SYNOPSIS
cpulimit [TARGET] [OPTIONS...]
DESCRIPTION
TARGET must be exactly one of these:
-p, --pid=N
pid of the process
-e, --exe=FILE
name of the executable program file
-P, --path=PATH
absolute path name of the executable program file
OPTIONS
-b, --background
run cpulimit in the background, freeing up the terminal
-c, --cpu
specify the number of CPU cores available. Usually this is detected for us.
-l, --limit=N
percentage of CPU allowed from 1 up. Usually 1 - 100, but can be higher on multi-core CPUs. (mandatory)
-v, --verbose
show control statistics
-z, --lazy
exit if there is no suitable target process, or if it dies
-h, --help
display this help and exit
EXAMPLES
Assuming you have started `foo --bar` and you find out with top(1) or ps(1) that this process uses all your CPU time you can either
# cpulimit -e foo -l 50
limits the CPU usage of the process by acting on the executable program file (note: the argument "--bar" is omitted)
# cpulimit -p 1234 -l 50
limits the CPU usage of the process by acting on its PID, as shown by ps(1)
# cpulimit -P /usr/bin/foo -l 50
same as -e but uses the absolute path name
# /usr/bin/someapp
# cpulimit -p $! -l 25 -b
Useful for scripts where you want to throttle the last command run.
# cpulimit -l 20 firefox
Launch Firefox web browser and limit its CPU usage to 20%
# cpulimit -c 2 -p 12345 -l 25
The -c flag sets the number of CPU cores the program thinks are available. Usually this is detected for us, but can be over-ridden.
NOTES
o cpulimit always sends the SIGSTOP and SIGCONT signals to a process, both to verify that it can control it and to limit the average
amount of CPU it consumes. This can result in misleading (annoying) job control messages that indicate that the job has been stopped
(when actually it was, but immediately restarted). This can also cause issues with interactive shells that detect or otherwise depend
on SIGSTOP/SIGCONT. For example, you may place a job in the foreground, only to see it immediately stopped and restarted in the back-
ground. (See also <http://bugs.debian.org/558763>.)
o When invoked with the -e or -P options, cpulimit looks for any process under /proc with a name that matches the process name argument
given. Furthermore, it uses the first instance of the process found. To control a specific instance of a process, use the -p option
and provide a PID.
o The current version of cpulimit assumes the kernel HZ value 100.
AUTHOR
This manpage was written for the Debian project by gregor herrmann <gregoa@debian.org> but may be used by others.
cpulimit June 2012 CPULIMIT(1)