If the process is still running you can query its elapsed time
For measurement of service (daemon process) uptime/downtime you need a monitoring tool (nmon or zabbix or nagios or ...)
I have a file which has 3 coloumns emp_name, Joining_date, Designation.
abc 12/1/2001 SSE
def 2/25/2007 SE
ghi 3/18/2009 SA
abc 8/1/2008 SSE
def 2/13/2007 SE
ghi 3/24/2005 SA
I need to find out the emp who has been in the company for longest period(Till date).
Can I have any... (3 Replies)
hi, i'm trying to figure out how to tell the amount of time a ufsdump of a directory takes. i use the below command:
echo "Starting Backup of u4" >> /backup/backup.log 2>&1
/usr/sbin/ufsdump 0uf /dev/rmt/0n /u4 >> /backup/backup.log 2>&1
echo "Finished Backup of u4" >> /backup/backup.log... (0 Replies)
Hello forum, i would like to ask if there's a way to view the remaining time of copying files (talking about copying gigabytes) while the cp commnad is running.
I'm using OpenBSD 4.9 -stable.
Thanx in advance. :) (2 Replies)
Hi,
I am looking to write a script to kill the process which are running for more than 7 days.
So i have a command like
"ps -eo pid,etime,args | grep -i xxxx" ( process which has xxx in it and running for more than 7 days needs to be killed ).
When i exeucte the above command , i am... (2 Replies)
I have used the arecord command like this
arecord -d 1 test.wav
It is keep on waiting. I need to manually interrupt it by ctrl-c. Why it is not interrupting after one second?
The arecord version which I am using is :
arecord: version 1.0.23 by Jaroslav Kysela (3 Replies)
Hello All,
I have two strings with date and time as follows..
$starttime= "06/11/2013 ";
$starttime= "05:15";
$enddate="06/12/2013";
$endtime="04:45";
dates are in mm/dd/yyyy format and time in military format.
and I am looking the duration of time(in minutes) in between dates.
... (3 Replies)
I have a file with time in it. I need to find the duration between the timestamp by subtracting second row from third row and so on. and wherever it is more than 30 minutes it should display start and end time which have been subtracted
file :
00:44:11
00:44:11
00:44:13
00:44:13
00:46:51... (2 Replies)
did this function to generate the duration of all the video files in a folder or multiple folders, it works fine for my use (I am no Guru as you may have noticed) but when I give it a lot of folders the calculation get a bit borked.
If any good soul had the energy to look at it and give... (4 Replies)
Discussion started by: zouhair
4 Replies
LEARN ABOUT HPUX
getppid
getpid(2) System Calls Manual getpid(2)NAME
getpid(), getpgid(), getpgrp(), getpgrp2(), getppid() - get process, process group and parent process ID.
SYNOPSIS DESCRIPTION
These functions return process, process group and parent process IDs, as follows:
Process group ID of the specified process.
If pid is zero, the call applies to the calling process. Same result as
Process group ID of the calling process.
Process group ID of the specified process.
If pid is zero, the call applies to the calling process. Same result as
Process ID of the calling process.
Parent process ID of the calling process.
If the parent process is the initialization process (known as the call returns 1.
Security Restrictions
The system call is subject to compartmental restrictions. See compartments(5) for more information about compartmentalization on systems
that support that feature.
Compartmental restrictions can be overridden if the process possesses the privilege (PRIV_COMMALLOWED). Processes owned by the superuser
may not have this privilege. Processes owned by any user may have this privilege, depending on system configuration. See privileges(5)
for more information about privileged access on systems that support fine-grained privileges.
RETURN VALUE
The functions return the following values:
Successful completion.
n is a nonnegative process ID, as described above.
Failure:
and only. is set to indicate the error.
ERRORS
If or fails, is set to one of the following values:
[EPERM] The current process and pid are not in the same session (see setsid(2)).
[ESRCH] No process can be found corresponding to that specified by pid.
AUTHOR
and were developed by HP, AT&T, and the University of California, Berkeley.
SEE ALSO exec(2), fork(2), setpgid(2), setsid(2), signal(5).
STANDARDS CONFORMANCE getpid(2)