03-06-2006
i accept the point with respect to the granularity of the clock command
(time resolution is only .01 second )
but it is ANSI standard and it is easily portable
on the other, gettimeofday() applicable to SVr4 and BSD4.3 standards,
so most likely it should support other versions.
and one main drawback is lesser OS donot support it...
7 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I hope I am posting the query at right place..
I have the project running as 32 bit application on Solaris 8. I want to port this to 64Bit application.
Before I start this process, I would like to compare the performance of a sample code running as 32Bit/64 Bit executables on a 64 bit... (1 Reply)
Discussion started by: amit_sapre
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Actually i wanted to check out the process time for the execution of commands on unix, i looking for the script which can include all commands which are to be executed on the system and i need to get the time for executing each command,
can somebody help me
Thanks & Regards
Murali (1 Reply)
Discussion started by: hsmuralidhara
1 Replies
3. Shell Programming and Scripting
The source number is always in megabytes and I need a script to covert into either MB,GB or TB displayed in a specific format.
Source number examples:
5345376635
34255
5453645846353
The result has to be maximum 2 numbers after the comma
1.13 TB
134.17 TB
413.46 GB
678.45 MB
I... (3 Replies)
Discussion started by: TehOne
3 Replies
4. IP Networking
Hi everyone,
I've just copied a snmpget script from somewhere. This script is basically used to collect basic router information. Ex: syscontact,syslocation,etc. And I want to extend the script to be able to collect some network information and utilization of some machines ex: bandwith usage,... (0 Replies)
Discussion started by: franzramadhan
0 Replies
5. Shell Programming and Scripting
I have an application performance measurement file with one thousand lines. Each line has some text indicating type of measurement and the last field containing the measured value. Each of the file has a unique measurement. I am interested in only extracting about 100 of those measurements and put... (2 Replies)
Discussion started by: yoda9691
2 Replies
6. IP Networking
Hey Guys,
Does anybody know, which OID's of Net-SNMP is used to collect throughput and bandwith usage of machine??
I got these OID's
..iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutOctets
..1.3.6.1.2.1.2.2.1.16
... (1 Reply)
Discussion started by: franzramadhan
1 Replies
7. UNIX for Advanced & Expert Users
Hi
Currently we have SAN setup in our Redhat Environment.
I have used iostat tool and ran it couple of times, i think there is IO bottle neck.
Can anyone suggest any other tools or help me how to perform multiple Reads/Writes to test its performance (1 Reply)
Discussion started by: rakeshkumar
1 Replies
LEARN ABOUT HPUX
gettimeofday
gettimeofday(2) System Calls Manual gettimeofday(2)
NAME
gettimeofday - get the date and time
SYNOPSIS
DESCRIPTION
The function obtains the current time, expressed as seconds and microseconds since Epoch, and stores it in the structure pointed to by tp.
The resolution of the system clock is one microsecond.
PARAMETERS
Programs should use this time zone information only in the absence of the environment variable.
tp A pointer to a structure in which the current time is returned.
The structure includes the following members:
tzp If this parameter is not a null pointer, it is interpreted as a pointer to a structure under HP-UX. The structure has the following
fields:
tz_minuteswest The number of minutes that the local time zone is west of Coordinated Universal Time (UTC) or Epoch.
tz_dsttime A flag that, if nonzero, indicates that Daylight Savings Time (DST) applies locally during the appropriate part of the
year.
RETURN VALUE
returns the following values under HP-UX:
Successful completion.
Failure.
is set to indicate the error.
ERRORS
If fails, is set to the following value under HP-UX:
[EFAULT] An argument address referenced invalid memory.
EXAMPLES
The following HP-UX example calls twice. It then computes the lapsed time between the calls in seconds and microseconds and stores the
result in a timeval structure:
WARNINGS
Relying on a granularity of one microsecond may result in code that is not portable to other platforms.
AUTHOR
was developed by the University of California, Berkeley, and HP.
SEE ALSO
date(1), ftime(2), settimeofda(2), stime(2), time(2), ctime(3C).
gettimeofday(2)