Sponsored Content
Full Discussion: checking process existed
Operating Systems HP-UX checking process existed Post 302169943 by jim mcnamara on Saturday 23rd of February 2008 07:11:34 AM
Old 02-23-2008
try man utmp or man wtmp.

The files record system activity, the man pages document calls to read the files directly.
No popen needed.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

checking for a running process from korn cron

cron starts a job every 10 minutes via a korn shell - I need to determine if the previous process is still running before I allow the new process to start - HELP I've tried ps -ef, etc but I have seen many situation where it says that the is running when it is not - any ideas on how to absolutely... (2 Replies)
Discussion started by: jph
2 Replies

2. Shell Programming and Scripting

Checking the cron process in unix

Hi Experts, Is there any command by which i can chk that the cron process is running fine? Say i have scheduled the cron to run at 10 o clock every monday,Do i need to wait for the time it runs and then chk using ps -ef? Please shed some light. Thanks Ashok. (2 Replies)
Discussion started by: Ashok_oct22
2 Replies

3. Shell Programming and Scripting

Checking for multiple instances of a process

Hi I have a scenario where i need to check multiple instances of a running shell script (abc.sh) . How can I find from inside a running shell script whether any other instance of the same script is running or not? If any other instance of same shell script is running I need to exit from... (4 Replies)
Discussion started by: raghu.amilineni
4 Replies

4. Shell Programming and Scripting

checking file whether existed in another server or not

Hi, i am in 272.22.22.32 server, and i want to check whether a file test.txt file exists in different server like 372.23.23.23 using shell script. can any one help me out. (1 Reply)
Discussion started by: KiranKumarKarre
1 Replies

5. Shell Programming and Scripting

checking file whether existed in another server or not

need a shell script in unix to check whether a file is existed in dir after connecting using ftp (2 Replies)
Discussion started by: KiranKumarKarre
2 Replies

6. Shell Programming and Scripting

Process checking loop

Hi, I want to create a script who will check if the java process is running & if it finds the process is still there it continues to execute & when the process completes it exit from the script. I have written a code to check & notify the process existence but i am not getting how to write... (4 Replies)
Discussion started by: d8011
4 Replies

7. Shell Programming and Scripting

block process checking

How can i check block process in Linux? If found any what action is required? How to check the pid of process? How to kill the block process? How to find out bottleneck process? (3 Replies)
Discussion started by: learnbash
3 Replies

8. Shell Programming and Scripting

My Script For Process Checking is NOT Working

Hello there ULF, Good day! Just want to share my code and as well as my problem on why I'm not getting the output that I want. My original code was: #!/usr/bin/sh echo echo -n "Please input an IP-Pool: " read ip echo echo "Please wait....."... (8 Replies)
Discussion started by: rymnd_12345
8 Replies

9. Shell Programming and Scripting

Problem with a script for checking the state of a process

Hello Everyone, I have a process that should be always running. Unfortunately, this process is getting down almost every 10 minutes. I want to make a script that verify the state of this process: If the process is up, the script shouldn't do nothing and if it's down he should run it. Can... (3 Replies)
Discussion started by: adilyos
3 Replies

10. Shell Programming and Scripting

Checking DataPump Process

Hi All, I am writing script for Env refresh for Oracle DB. I am using Datapump for that. If i start expdp or impdp, how can i know that export or import has completed. I have query for that. How will i integrate with script?. Or any command i can run from Linux side. Please share you... (1 Reply)
Discussion started by: pvmanikandan
1 Replies
getpid(2)							System Calls Manual							 getpid(2)

NAME
getpid, getpgrp, getppid - Gets the process ID, process group ID, parent process ID SYNOPSIS
#include <unistd.h> pid_t getpid( void ); pid_t getpgrp( void ); pid_t getppid( void ); Application developers may want to specify an #include statement for <sys/types.h> before the one for <unistd.h> if programs are being developed for multiple platforms. The additional #include statement is not required on Tru64 UNIX systems or by ISO or X/Open standards, but may be required on other vendors' systems that conform to these standards. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: getpid(), getpgrp(), getppid(): POSIX.1, XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The getpid() function returns the process ID of the calling process. The getpgrp() function returns the process group ID of the calling process. The getppid() function returns the parent process ID of the calling process. When a process is created, its parent process ID is the process ID of its parent process. If a parent process exits, the parent process IDs of its child processes are changed to the process ID of the init program. RELATED INFORMATION
System calls: fork(2), kill(2), setpgid(2), setsid(2), wait(2) Standards: standards(5) delim off getpid(2)
All times are GMT -4. The time now is 06:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy