Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pmparseinterval(3) [centos man page]

PMPARSEINTERVAL(3)					     Library Functions Manual						PMPARSEINTERVAL(3)

NAME
pmParseInterval - convert interval string to timeval structure C SYNOPSIS
#include <pcp/pmapi.h> int pmParseInterval(const char *string, struct timeval *rslt, char **errmsg); cc ... -lpcp DESCRIPTION
pmParseInterval parses the argument string specifying an interval of time and fills in the tv_sec and tv_usec components of the rslt struc- ture to represent that interval. The input string is most commonly the argument following a -t command line option to a PCP application, and the syntax is fully described in PCPIntro(1). pmParseInterval returns 0 and errmsg is undefined if the parsing is successful. If the given string does not conform to the required syntax pmParseInterval returns -1 and a dynamically allocated error message string in errmsg. The error message is terminated with a newline and includes the text of the input string along with an indicator of the position at which the error was detected, e.g. 4minutes 30mumble ^ -- unexpected value In the case of an error, the caller is responsible for calling free(3C) to release the space allocated for errmsg. SEE ALSO
PMAPI(3) and pmParseTimeWindow(3). Performance Co-Pilot PCP PMPARSEINTERVAL(3)

Check Out this Related Man Page

PMPARSETIME(3)						     Library Functions Manual						    PMPARSETIME(3)

NAME
__pmParseTime - parse time point specification C SYNOPSIS
#include <pcp/pmapi.h> #include <pcp/impl.h> int __pmParseTime(const char *string, struct timeval *logStart, struct timeval *logEnd, struct timeval *rslt, char **errMsg); cc ... -lpcp DESCRIPTION
__pmParseTime is designed to encapsulate the interpretation of a time point specification in command line switches for use by the PCP client tools. This function expects to be called with the time point specification as string. If the tool is running against PCP archive(s), you also need to supply the start time of the first (only) archive as logStart, and the end of the last (only) archive as logEnd. See pmGetArchive- Label(3) and pmGetArchiveEnd(3) for how to obtain values for these parameters. If the tool is running against a live feed of performance data, logStart should be the current time (but could be aligned on the next second for example), while logEnd should have its tv_sec compo- nent set to INT_MAX. The rslt structure must be allocated before calling __pmParseTime. You also need to set the current PCP reporting time zone to correctly reflect the -z and -Z command line parameters before calling __pm- ParseTime. See pmUseZone(3) and friends for information on how this is done. If the conversion is successful, __pmParseTime returns 0, and fills in rslt with the time value defined by the input parameters. If the argument strings could not be parsed, it returns -1 and a dynamically allocated error message string in errMsg. Be sure to free(3C) this error message string. SEE ALSO
PMAPI(3), pmGetArchiveEnd(3), pmGetArchiveLabel(3), pmNewContextZone(3), pmNewZone(3), pmParseInterval(3), pmParseTimeWindow(3), pmUse- Zone(3), __pmConvertTime(3) and __pmParseCtime(3). Performance Co-Pilot PCP PMPARSETIME(3)
Man Page

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rename error message!

Can anyone tell me why I keep on getting this error message? ../dosRename: syntax error at line 77: `end of file' unexpected I have treid everything and I just can get it to work! Here is the code: #!/bin/sh Usage() { && echo "\n$*\n" >&2 cat <<-EOD_USAGE >&2 Usage:... (4 Replies)
Discussion started by: Zeta_Acosta
4 Replies

2. Shell Programming and Scripting

nawk

Hi, I had this syntax and no matter what I do, I can't get it run. err message: run6: syntax error at line 121 : `(' unexpected I went to line 121 and it's comment out! All the variables passed to nawk are valid. There are two places I suspect have the problem: 1.... (3 Replies)
Discussion started by: whatisthis
3 Replies

3. Shell Programming and Scripting

"syntax error at line 21 :'done' unexpected." error message"

I am trying to run the script bellow but its given me "syntax error at line 20 :'done' unexpected." error message" can someone check to see if the script is ok? and correct me pls. Today is my first day with scripting. Gurus should pls help out #!/bin/ksh # Purpose: Check to see if file... (3 Replies)
Discussion started by: ibroxy
3 Replies

4. Shell Programming and Scripting

syntax error

A newbie in scripting is trying to run the script bellow but keep getting an error message ; syntax error at line 76 : `<<' unmatched what we have on that area pointed to is highlighted in red bellow: ################################################## fi # Memory Performance (vmstat -... (5 Replies)
Discussion started by: ibroxy
5 Replies

5. UNIX for Dummies Questions & Answers

unexpected error

./sample.5: syntax error: `(' unexpected I get this error and Im trying to solve it but the line that it refering to is a notation so I don't understand why it is affecting the program. (2 Replies)
Discussion started by: helpme2008
2 Replies

6. Shell Programming and Scripting

Getting error "syntax error at line 78 : `<' unmatched"

Hi Guys, I have a following code in cm1.sh script. cnt=`sqlplus -s <un>/<pwd> << !EOF set heading off verify off pagesize 0 select count(*) from fnd_svc_components where component_name like '%Mailer%' and component_status != 'RUNNING'; exit; !EOF` echo $cnt if ; then sqlplus -s... (1 Reply)
Discussion started by: sshah1001
1 Replies

7. Shell Programming and Scripting

sh syntax error unexpected token done

I'm getting the following error: line 21: syntax error near unexpected token `done` line 21: `done` and I haven't been able to figure out why. Here is my code #!/bin/sh if ; then echo 'Usage: rename getexp/replStr ' exit 0 fi arg = $1 shift while ; do (5 Replies)
Discussion started by: NullPointer
5 Replies

8. Shell Programming and Scripting

need help in greping

Hi, i have to find a string in a file and positin of the string in the file would come in some particular interval. let's say file is 1-1000 lines and string is in from 200-300line. could any one suggest me how to get make the grep search for the string in that particular portion of the... (4 Replies)
Discussion started by: tarakant
4 Replies

9. Shell Programming and Scripting

syntax error near unexpected token `for file in

I am trying to run the code below however I am getting a "syntax error near unexpected token `for file in error" on the line that is in red. I have the semicolons after every line because it will fail on the copy if I don't have them saying that it cannot stat directory. Is there something that I... (3 Replies)
Discussion started by: coach5779
3 Replies

10. UNIX for Beginners Questions & Answers

Getting this error syntax error near unexpected token `)'

Hi Everyone, my script was running Ok, but suddenly it started giving this error. ./update_env_bi.sh: line 54: syntax error near unexpected token `)' ./update_env_bi.sh: line 54: `sed -i "s/PORT=*1/PORT=$2/" repository.xml' The line 54 has this code. sed -i "s/PORT=*1/PORT=$2/"... (2 Replies)
Discussion started by: shajay12
2 Replies