02-26-2010
The syntax for "ps" varies, as does the output. Please post which Operating System you have.
Btw. When you have multiple CPUs the percentage from "ps" is a percentage of one CPU. Thus a single process could run at 100% CPU without having any adverse effect. The more CPUs you fit to the computer the more likely you are to see processes with a very high CPU percentage.
Detecting a looping process is a fine art and I don't think that a single snapshot of the CPU percentage is useful for deciding whether to kill a process. It is unlikely that you would come up with a single command line which would be safe to run in a commerical environment.
A perfectly sized and perfectly tuned computer would have everything running at 100% with no wait states.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi everyone,
I am new to UNIX and scripting, and I have some problems with the test command.
when i try to execute the command:
test 20070327.gz > 20070320.gz
i try to make a charachter string comparison between the two strings or the two files, to make sure that 20070327.gz is greater than... (2 Replies)
Discussion started by: marwan
2 Replies
2. AIX
Hello,
I am trying to add some tests to existing code. The code already contains some test commands. An example is as follows...
] then
Does anyone know the purpose of the double equals? I would have used a single equals sign... (2 Replies)
Discussion started by: JWilliams
2 Replies
3. Shell Programming and Scripting
I have been looking into searching various files to display output.
The search criteria will be a month and year to output various numbers in the files.
is there any way to do this with the TEST function or would it have to be another way? (4 Replies)
Discussion started by: amatuer_lee_3
4 Replies
4. Shell Programming and Scripting
Plese help me on the below query.
for j in *.20071231* *.ctl *.dat
do
(
if then
cp "$base/*.*" "$base1"
fi
)
done
My requirement is for all files that has extension *.20071231* *.ctl *.dat
should be copied to another folder.
But those with caaa.20071231.log... (7 Replies)
Discussion started by: sussane
7 Replies
5. Programming
I'm very new to C and could use a little help.
I'm testing to make sure the command is running as it's proper name, if not then fail.
if (strcmp(argv, "xinit") != 0) {
fprintf(stdout, "name = %s length = %d\n",argv,l);
usage(0);
}
This works if the command is... (3 Replies)
Discussion started by: nck
3 Replies
6. UNIX for Dummies Questions & Answers
Hi all!
I'm new to shell scripting, and I need to do a diff between two dirs. One of them (dir_old) contains many files, and the other (dir_new) contains just a set of 8 files, all starting with MC and extension .CP.
The problem I have is that dir_old contains about 20 files that start with... (1 Reply)
Discussion started by: fpp666
1 Replies
7. Shell Programming and Scripting
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Discussion started by: Max89
1 Replies
8. Shell Programming and Scripting
How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies
9. Shell Programming and Scripting
Hello,
I need help with a test command.
Here is what I am trying to do :
I've got an interactive script that check if configuration files exist on 2 different directories, then all configuration files are print on screen by a short name.
My problem is when you type a "wrong name" or... (12 Replies)
Discussion started by: Aswex
12 Replies
10. Shell Programming and Scripting
Could somebody please explain to me why and how the highlighted line(s) (?) of code puts the "test" evaluation into "result" and then to $enable_static ? Or does not ?
I did comment out the original code and changed it to what I feel is less cryptic , but the "result" is still wrong =... (3 Replies)
Discussion started by: anne
3 Replies
vsig(1F) FMLI Commands vsig(1F)
NAME
vsig - synchronize a co-process with the controlling FMLI application
SYNOPSIS
vsig
DESCRIPTION
The vsig executable sends a SIGUSR2 signal to the controlling FMLI process. This signal/alarm causes FMLI to execute the FMLI built-in
command checkworld which causes all posted objects with a reread descriptor evaluating to TRUE to be reread. vsig takes no arguments.
EXAMPLES
Example 1: A sample output of vsig command.
The following is a segment of a shell program:
echo "Sending this string to an FMLI process"
vsig
The vsig executable will flush the output buffer before it sends the SIGUSR2 signal to make sure the string is actually in the pipe created
by the cocreate function.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
SEE ALSO
coproc(1F), kill(1), kill(2), signal(3C), attributes(5)
NOTES
Because vsig synchronize with FMLI, it should be used rather than kill to send a SIGUSR2 signal to FMLI.
SunOS 5.10 5 Jul 1990 vsig(1F)