Sponsored Content
Full Discussion: Q's on Active Process Time
Top Forums Shell Programming and Scripting Q's on Active Process Time Post 302495337 by stevefox on Thursday 10th of February 2011 01:39:09 AM
Old 02-10-2011
MySQL

Thank you Chubler_XL !!!
I was able to achieve what I want it !!!
I didn't know about the UNIX95 command.
Thank you very much for your great support!!!

Cheers
Steve
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

vmstat returns good val for cpuIdle put ps shows no active process

hi i'm running a shell script that checks the amount of cpu idle either using /usr/bin/vmstat 1 2 or sar 1 2 (on unixware) before i run some tests(if cpu idle greater than 89 I run them). These tests are run on many platforms, linux(suse, redhat) hp-ux, unixware, aix, solaris, tru64. ... (5 Replies)
Discussion started by: OFFSIHR
5 Replies

2. UNIX for Dummies Questions & Answers

how to Decrease priority of a particular process in time of process creation

how to decrease priority of a particular process in time of process creation... and also how to decrease priority of a particular process after process creation.. can any one please help me out... (2 Replies)
Discussion started by: Ramkum
2 Replies

3. UNIX for Advanced & Expert Users

Process accounting and Shell process time

Hi All, I am running the following accounting on one of my executable, $ accton /home/myexe-acct $ ./myexe $ accton When I check the process timings I get the below result, Shell process time: 300ms myexe time: 100ms I want to know on why the shell(sh) process is taking so much time... (1 Reply)
Discussion started by: santoshbr4
1 Replies

4. Linux

Process start time not showing correct time

Process start time is not showing the correct time: I had started a process on Jun 17th at 23:30:00. Next day morning when I run the command "ps -ef | grep mq", the process is showing the start date of Jun 17th but the start time is 00:16:41 Day/Date is setup correctly on the server. It... (2 Replies)
Discussion started by: hemangjani
2 Replies

5. UNIX for Advanced & Expert Users

Rollover/compress log from ACTIVE process

I have some Solaris processes that run weeks at a time that create rather large log files that I would like to archive/compress daily. Instead of stopping the process, what can be done so that the log file is backed up and shrunk, but the process can still log to the open file handle without major... (7 Replies)
Discussion started by: ckmehta
7 Replies

6. Shell Programming and Scripting

determine the active processes on the system which are running since long time

Hi , Please help me shell script to determine the active processes on the system which are running since long time (2 Replies)
Discussion started by: itian2010
2 Replies

7. Shell Programming and Scripting

How to calculate time difference between start and end time of a process!

Hello All, I have a problem calculating the time difference between start and end timings...! the timings are given by 24hr format.. Start Date : 08/05/10 12:55 End Date : 08/09/10 06:50 above values are in mm/dd/yy hh:mm format. Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies

8. UNIX for Dummies Questions & Answers

Active sessions open or long time

What kind of problems can be faced if any session which connects to unix server is open for longer time? How to find out from how much time that session is idle? :) (2 Replies)
Discussion started by: anandgodse
2 Replies

9. UNIX for Dummies Questions & Answers

Determining if a process is active in UNIX

We have written a bare bones scheduling app using bash scripts. The input to the scheduler is from a mainframe scheduling tool, and the scripts exit code is returned to the MF. The problem is that every now and again I have a script that does not complete and this is left in my Q. I am in the... (1 Reply)
Discussion started by: Charles Swart
1 Replies
strftime(3)						     Library Functions Manual						       strftime(3)

Name
       strftime - convert time and date to string

Syntax
       #include <time.h>

       int strftime (s, maxsize, format, tm)
       char *s;
       size_t maxsize;
       char *format;
       struct tm *tm;

Description
       The  function  places characters in the array pointed to by s.  No more than maxsize characters are placed into the array.  The string con-
       trols this process.  This string consists of zero or more directives and ordinary characters.  A directive consists of a character followed
       by  a  character that determines the behavior of the directive.	All ordinary characters are copied unchanged into the array, including the
       terminating null character.

       Each directive is replaced by the appropriate characters as shown in the following table. The characters are determined	by  the  program's
       locale category and the values contained in the structure pointed to by tm.

       -------------------------------------------------------------
       Directive   Replaced by
       -------------------------------------------------------------
       %a	   Locale's abbreviated weekday name
       %A	   Locale's full weekday name
       %b	   Locale's abbreviated month name
       %B	   Locale's full month name
       %c	   Locale's date and time representation
       %d	   Day of month as a decimal number (01-31)
       %D	   Date (%m/%d/%y)
       %h	   Locale's abbreviated month name
       %H	   Hour as a decimal number (00-23)
       %I	   Hour as a decimal number (01-12)
       %j	   Day of year (001-366)
       %m	   Number of month (01-12)
       %M	   Minute number (00-59)
       %n	   Newline character
       %p	   Locale's equivalent to AM or PM
       %r	   Time in AM/PM notation
       %S	   Second number (00-59)
       %t	   Tab character
       %T	   Time (%H/%M/%S)
       %U	   Week number (00-53), Sunday as first day of week
       %w	   Weekday number (0[Sunday]-6)
       %W	   Week number (00-53), Monday as first day of week
       %x	   Locale's date representation
       %X	   Locale's time representation
       %y	   Year without century (00-99)
       %Y	   Year with century
       %Z	   Timezone name, no characters if no timezone
       %%	   %
       -------------------------------------------------------------

       If a directive is used that is not contained in the table, the results are undefined.

   International Environment
       LC_TIME	      Contains the user's requirements for language, territory, and codeset for the time format.  affects the behavior of the time
		      functions in If is not defined in the current environment, provides the necessary default.

       LANG	      If this environment is set and valid, uses the international language database named in the definition to determine the time
		      formatting rules. If is defined, its definition supercedes the definition of

Return Values
       If  the	total  number  of  resulting characters, including the terminal null character, is not more than maxsize, the function returns the
       total of resultant characters placed into the array pointed to by s, not including the terminating null character.  In all other cases zero
       is returned and the contents of the array are indeterminate.

       As the name is not contained in the tm structure the value returned by %Z is determined by the function, see

See Also
       ctime(3), setlocale(3)

																       strftime(3)
All times are GMT -4. The time now is 03:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy