12-27-2007
Re: check process running
Thanks for replying. I did search but I didn't find what I want.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am writing a shell script to invoke a C++ program. Before I start the C++ program (oi7loadbalancer), I am checking if the process is already running. I start the process only if it is not already running. I have the following check in my script.
proccount=`ps -f -u $USER_NAME | grep... (8 Replies)
Discussion started by: sim
8 Replies
2. UNIX for Advanced & Expert Users
I have a requirement to check how long a process is running on unix system.If i use ps -ef i am getting the following message
guest 2453638 1998920 0 16:16:05 - 0:00 dsapi_slave 9 8 0
but this is showing only time not the date.Can any one please advice me any script to find out how... (2 Replies)
Discussion started by: ukatru
2 Replies
3. UNIX for Advanced & Expert Users
How do I check if a particular process is running from a certain date and time ? (2 Replies)
Discussion started by: hpuxlxboy
2 Replies
4. Shell Programming and Scripting
Hi ,
I have a csh code below which check the process if it's running.
Can any expert advise me on the following:
1) what does this notationmean ">!" and how is it different from the append ">" notation ?
2) how does "setenv" work in this code ?
# Check whether there is a running... (3 Replies)
Discussion started by: Raynon
3 Replies
5. UNIX and Linux Applications
Hi
I would like to check if an instance of a script is already running.
I've seen many different examples, but I haven't the slightest idea as to how to do this.
Can you please help.
Thank you. (5 Replies)
Discussion started by: ladyAnne
5 Replies
6. UNIX for Dummies Questions & Answers
Hi
What is the best command to check if a particular process is running in a linux server or not
To check any java process, I use the below command.
ps -ef |grep jvm
When I execute the above command, it lists me all the processess . The above command should ideally return only the... (6 Replies)
Discussion started by: vr3w3c9
6 Replies
7. Programming
How to I check if a process is running in C? I'm trying to use ps aux |grep "process name" but failing in doing that. How do I do that?
Thanks, (1 Reply)
Discussion started by: cprogdude
1 Replies
8. Shell Programming and Scripting
Hi,
I check if the process is running or not using the below.
/usr/ucb/ps auxww | grep 109 |grep rmi | awk '{print $2}'
9718
Thus we see 9718 is the PID.
It return blank if the process is not running.
I need to perform some action if the process is not running and leave it if... (8 Replies)
Discussion started by: shifahim
8 Replies
9. UNIX for Dummies Questions & Answers
I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is... (2 Replies)
Discussion started by: saurabhnsit2001
2 Replies
10. Shell Programming and Scripting
Hi Gurus,
t=`ps -u irb|grep -v grep|grep BSNL_PAYMENT_C`
echo $t
if
then
echo $?
echo "Process Creation is Running ...."
else
echo "Process went down at $dat $tim"
fi
How would i use loop so that the script continously checks for the current status of this process.... (1 Reply)
Discussion started by: ankitknit
1 Replies
LEARN ABOUT DEBIAN
keyctl_search
KEYCTL_SEARCH(3) Linux Key Management Calls KEYCTL_SEARCH(3)
NAME
keyctl_search - Search a keyring for a key
SYNOPSIS
#include <keyutils.h>
long keyctl_search(key_serial_t keyring, const char *type,
const char *description, key_serial_t destination);
DESCRIPTION
keyctl_search() recursively searches the keyring for a key of the specified type and description.
If found, the key will be attached to the destination keyring (if given), and its serial number will be returned.
The source keyring must grant search permission to the caller, and for a key to be found, it must also grant search permission to the call-
er. Child keyrings will be only be recursively searched if they grant search permission to the caller as well.
If the destination keyring is zero, no attempt will be made to forge a link to the key, and just the serial number will be returned.
If the destination keyring is given, then the link may only be formed if the found key grants the caller link permission and the destina-
tion keyring grants the caller write permission.
If the search is successful, and if the destination keyring already contains a link to a key that matches the specified type and descrip-
tion, then that link will be replaced by a link to the found key.
The source keyring and destination keyring serial numbers may be those of valid keyrings to which the caller has appropriate permission, or
they may be special keyring IDs:
KEY_SPEC_THREAD_KEYRING
This specifies the caller's thread-specific keyring.
KEY_SPEC_PROCESS_KEYRING
This specifies the caller's process-specific keyring.
KEY_SPEC_SESSION_KEYRING
This specifies the caller's session-specific keyring.
KEY_SPEC_USER_KEYRING
This specifies the caller's UID-specific keyring.
KEY_SPEC_USER_SESSION_KEYRING
This specifies the caller's UID-session keyring.
RETURN VALUE
On success keyctl_search() returns the serial number of the key it found. On error, the value -1 will be returned and errno will have been
set to an appropriate error.
ERRORS
ENOKEY One of the keyrings doesn't exist, no key was found by the search, or the only key found by the search was a negative key.
ENOTDIR
One of the keyrings is a valid key that isn't a keyring.
EKEYEXPIRED
One of the keyrings has expired, or the only key found was expired.
EKEYREVOKED
One of the keyrings has been revoked, or the only key found was revoked.
ENOMEM Insufficient memory to expand the destination keyring.
EDQUOT The key quota for this user would be exceeded by creating a link to the found key in the destination keyring.
EACCES The source keyring didn't grant search permission, the destination keyring didn't grant write permission or the found key didn't
grant link permission to the caller.
LINKING
Although this is a Linux system call, it is not present in libc but can be found rather in libkeyutils. When linking, -lkeyutils should be
specified to the linker.
SEE ALSO
keyctl(1),
add_key(2),
keyctl(2),
request_key(2),
keyctl_get_keyring_ID(3),
keyctl_join_session_keyring(3),
keyctl_update(3),
keyctl_revoke(3),
keyctl_chown(3),
keyctl_setperm(3),
keyctl_describe(3),
keyctl_clear(3),
keyctl_link(3),
keyctl_unlink(3),
keyctl_read(3),
keyctl_instantiate(3),
keyctl_negate(3),
keyctl_set_reqkey_keyring(3),
keyctl_set_timeout(3),
keyctl_assume_authority(3),
keyctl_describe_alloc(3),
keyctl_read_alloc(3),
request-key(8)
Linux 4 May 2006 KEYCTL_SEARCH(3)