10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Group,
We want to create a script in order to filter process in the system with more than five days (STIME) and then kill them under Solaris 10.
How can we filter these kind of process ?
ps -efa
Thanks in advance for your help (4 Replies)
Discussion started by: csierra
4 Replies
2. Linux
Hi guys is it normal to have 5-10 cron/syslog processes running... in my case i got 10 cron process running. (4 Replies)
Discussion started by: batas
4 Replies
3. Solaris
Hi guys just a question is it normal to see running process on a non-global zone in the global zone... processes such as cron. (3 Replies)
Discussion started by: batas
3 Replies
4. HP-UX
Hello; trying to find processes older than n days, mostly user shells Tried the following code on 11.31 box: in this case older than 5 days
UNIX95= ps -ef -o user,pid,ppid,cpu,etime,stime | grep "-" | awk '{print $2}' | xargs ps -ef|grep -v '?' |\
awk '$5 !~ ""' | awk '($5 ~ "$(date "+%b")")... (6 Replies)
Discussion started by: delphys
6 Replies
5. Shell Programming and Scripting
Hi.. i have written a shell script and made this script to run on every day night 11: 55 pm using a cron job.
This cron job running for some days and is not running for some day. but i need this script to run every day night. Please help me.
Here is the cron tab entries,
55 23 * * *... (1 Reply)
Discussion started by: vidhyaS
1 Replies
6. Shell Programming and Scripting
Hi can anybody help me regarding this..
i want know the output of ps -ef with explanation.
how can we know the running processess.
this is the output of ps -elf
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
19 T root 0 0 0 0 SY ... (1 Reply)
Discussion started by: rajesh_pola
1 Replies
7. Shell Programming and Scripting
ps -xfu <user name> this command line will list all the process currently running for <user name>.
I need to filter this output. I need all the process which are running for more than 3 days(excluding demon/sys process) . The list should include PID, PPID, STIME, process/command.
I am using... (20 Replies)
Discussion started by: Sriranga
20 Replies
8. Shell Programming and Scripting
I'm doing a script with the Shell. I need that it only show the number of running processes.
Ex:
echo "There are `command` running processes"
Thnx!
Pd: Sorry the idiom. I'm spanish. (5 Replies)
Discussion started by: Ikebana
5 Replies
9. Shell Programming and Scripting
Hi, I need a .ksh script that lists all the process that are currently running and older than 3 days. once the process list is available i need to mail the list and then kill those processes.
Quick response is highly appreciated :b:
Thanks in Advance!!!
Sri (3 Replies)
Discussion started by: Sriranga
3 Replies
10. UNIX for Dummies Questions & Answers
Hi
i've been googling a lot but can't find an answer. All I would like to know is how to find out all processes that are running on a machine.
I know ps gives all YOUR processes.
thanks (9 Replies)
Discussion started by: speedieB
9 Replies
KILL(2) BSD System Calls Manual KILL(2)
NAME
kill -- send signal to a process
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <signal.h>
int
kill(pid_t pid, int sig);
DESCRIPTION
The kill() function sends the signal given by sig to pid, a process or a group of processes. sig may be one of the signals specified in
sigaction(2) or it may be 0, in which case error checking is performed but no signal is actually sent. This can be used to check the valid-
ity of pid.
For a process to have permission to send a signal to a process designated by pid, the real or effective user ID of the receiving process must
match that of the sending process or the user must have appropriate privileges (such as given by a set-user-ID program or the user is the
super-user). A single exception is the signal SIGCONT, which may always be sent to any descendant of the current process.
If pid is greater than zero:
sig is sent to the process whose ID is equal to pid.
If pid is zero:
sig is sent to all processes whose process group ID is equal to the process group ID of the sender, and for which the process has
permission; this is a variant of killpg(3).
If pid is -1:
If the user has super-user privileges, the signal is sent to all processes excluding system processes and the process sending the
signal. If the user is not the super user, the signal is sent to all processes with the same uid as the user excluding the process
sending the signal. No error is returned if any process could be signaled.
For compatibility with System V, if the process number is negative but not -1, the signal is sent to all processes whose process group ID is
equal to the absolute value of the process number. This is a variant of killpg(3).
RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error.
ERRORS
kill() will fail and no signal will be sent if:
[EINVAL] sig is not a valid signal number.
[ESRCH] No process can be found corresponding to that specified by pid.
[ESRCH] The process id was given as 0 but the sending process does not have a process group.
[EPERM] The sending process is not the super-user and its effective user id does not match the effective user-id of the receiving
process. When signaling a process group, this error is returned if any members of the group could not be signaled.
SEE ALSO
getpgrp(2), getpid(2), sigaction(2), killpg(3), signal(7)
STANDARDS
The kill() function is expected to conform to ISO/IEC 9945-1:1990 (``POSIX.1'').
BSD
April 19, 1994 BSD