Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pmctime(3) [centos man page]

PMCTIME(3)						     Library Functions Manual							PMCTIME(3)

NAME
pmCtime - format the date and time for a reporting timezone C SYNOPSIS
#include <time.h> #include <pcp/pmapi.h> char *pmCtime(const time_t *clock, char *buf); cc ... -lpcp DESCRIPTION
pmCtime is very similar to ctime(3), except the timezone used is the current ``reporting timezone'' (rather than the default TZ environment variable scheme), and the result is returned into a caller-declared buffer (rather than a private buffer). Like ctime(3) the time to be converted is passed via clock, and the result in buf is fixed width fields in the format: Fri Sep 13 00:00:00 1986 The result buffer buf must be at least 26 bytes long, and no attempt is made to check this. pmCtime returns buf as the value of the func- tion. The default current reporting timezone is as defined by the TZ environment variable, so pmCtime and ctime(3) will initially produce similar encoding of the date and time. Use pmNewZone(3), pmNewContextZone(3) or pmUseZone(3) to establish a new current reporting timezone that will effect pmCtime but not ctime(3). SEE ALSO
ctime(3), PMAPI(3), pmLocaltime(3), pmNewContextZone(3), pmNewZone(3) and pmUseZone(3). Performance Co-Pilot PCP PMCTIME(3)

Check Out this Related Man Page

PMNEWCONTEXTZONE(3)					     Library Functions Manual					       PMNEWCONTEXTZONE(3)

NAME
pmNewContextZone - establish a reporting timezone based on a PMAPI context C SYNOPSIS
#include <pcp/pmapi.h> int pmNewContextZone(void); cc ... -lpcp DESCRIPTION
The current reporting timezone affects the timezone used by pmCtime(3) and pmLocaltime(3). If the current PMAPI context is an archive, pmNewContextZone uses the timezone from the archive label record to set the current reporting timezone. If the current PMAPI context corresponds to a host source of metrics, pmNewContextZone executes a pmFetch(3) to retrieve the value for the metric pmcd.timezone and uses that to set the current reporting timezone. In both cases, pmNewContextZone returns a value to identify the current reporting timezone that may be used in a subsequent call to pmUse- Zone(3) to restore this reporting timezone. SEE ALSO
PMAPI(3), pmCtime(3), pmFetch(3), pmGetConfig(3), pmLocaltime(3), pmNewContext(3), pmNewZone(3), pmUseZone(3), pmWhichZone(3), pcp.conf(5), pcp.env(5) and environ(5). DIAGNOSTICS
PM_ERR_NOCONTEXT the current PMAPI context is not valid other a return value less than zero indicates a fatal error from a system call, most likely malloc(3C) Performance Co-Pilot PCP PMNEWCONTEXTZONE(3)
Man Page

12 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Converting regular time to CTIME

Does anyone know of an easy way to convert regular time 08/21/2002 @ 8:21:21 pm to ctime. I need this to complete a script that I am writing. Your expertise and help would be amost appreciated. Please note - I am not a programmer so c-code etc will not help. A utility that can be run from a... (9 Replies)
Discussion started by: PGPhantom
9 Replies

2. UNIX for Advanced & Expert Users

TimeZone changing in Solaris

I've date back one of my Unix WS ,after that again i want to return to real date,but after running: # date -u mmddHHMMyy the clock immediately returns to GMT timezone that is different with my local timezone. any suggestion could be useful... tanx --nikk (2 Replies)
Discussion started by: nikk
2 Replies

3. UNIX for Advanced & Expert Users

CPU time on multitask applications

Hello all, I'm using clock() function (from ctime) to realize how long it takes my threaded application to complete an algorithm. I would like to know how this function behaves in multicore boxes, that is: does it return the sum of the clock ticks of each processor the program was runned on ?... (0 Replies)
Discussion started by: clalfa
0 Replies

4. Shell Programming and Scripting

how to get a space between the result of (date +%d) command

Hi I want to insert a space between the result of the following command. day=$(date %d) i get the result as ------- Sep 2 i want to get the result as Sep 2(two space between Sep and 2) how can i get this... is this possible wid awk??:confused: (12 Replies)
Discussion started by: ladtony
12 Replies

5. Shell Programming and Scripting

Please Explain me this command

find . -type f -ctime +3 -exec mv {} /somedirectory/ \; in particular "-ctime v/s -mtime" and "difference between +3 and -3" (5 Replies)
Discussion started by: Rambo
5 Replies

6. UNIX for Dummies Questions & Answers

find command, "basic" questions

find $HOME \ ( \( -name ´*.bak´ -ctime +20 \) -o \ \( -size 0 -user kurs00 \) \) -exec rm -i {} \; -print this is the syntax, i know what -name, -ctime and so on means, but i don't know what the -o or the \\ or the () or the {} mean. Can someone please explain? I searched the internet, I... (4 Replies)
Discussion started by: Dr. Nick
4 Replies

7. Shell Programming and Scripting

Setting a TZ variable in a script

Hello all, I know this must be simple .... but i can't grasp what could be the issue. I'm trying to setup the timezone variable (to the unix command date) according to what i find in a value that i got from parsing the config file. The end result would be setting the log file with this new... (4 Replies)
Discussion started by: maverick72
4 Replies

8. UNIX for Advanced & Expert Users

tmpwatchc updates directory ctime?

Hi, I noticed that some directories under /tmp were updated ctime daily. As you can see below, I thought that was because of tmpwatch. # cat /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 02... (1 Reply)
Discussion started by: password636
1 Replies

9. Shell Programming and Scripting

find -ctime

I know that find -ctime +1 will find ALL files that have been modified that are greater than 1 day old and -ctime 1 will find files that are ONLY 1 day old -ctime -1 mean files that are less than a day old? Can find actually use this granularity? (5 Replies)
Discussion started by: BeefStu
5 Replies

10. HP-UX

Getting numeric timezone on HP-UX

Hi I thought the UNIX command date is universal and so I have been using date +%z to get the numberic timezone offset (e.g. -0500) however on HP-UX, this is not returning expected results; on my machine it returns the name of the time zone (e.g. EST) not numbers. does anyone know... (2 Replies)
Discussion started by: flagman5
2 Replies

11. UNIX for Dummies Questions & Answers

Ls -l displays ctime or mtime?

commands ls -l or just l displays ctime (changed time) or mtime (modified time)? (10 Replies)
Discussion started by: rupeshkp728
10 Replies

12. Answers to Frequently Asked Questions

find "/path" -type f -ctime +30

When I use the command find "/abc/xyz" -type f -ctime +30 getting the error as find:"/abc/xyz /lost+found: Permission Denied" I tired find "/abc/xyz" -type d \( ! lost+found \) -type f -ctime +30 The error is find: paths must precede expression Usage: find Tried find "/abc/xyz"... (1 Reply)
Discussion started by: anithab
1 Replies