PMC.TSC(3) BSD Library Functions Manual PMC.TSC(3)NAME
pmc.tsc -- measurements using the i386 timestamp counter
LIBRARY
Performance Counters Library (libpmc, -lpmc)
SYNOPSIS
#include <pmc.h>
DESCRIPTION
In the i386 architecture, the timestamp counter is a monotonically non-decreasing counter that counts processor cycles.
This counter may be selected specifying an event specifier ``tsc'' to pmc_allocate(3). The TSC is a read-only counter that may only be allo-
cated in system-wide counting mode. The ``tsc'' event does not support further event qualifiers.
Multiple processes are allowed to allocate the TSC. Once allocated, the TSC may be read using the pmc_read() function, or by using the RDTSC
instruction.
Event Name Aliases
The alias ``cycles'' maps to the TSC.
SEE ALSO pmc(3), pmc.atom(3), pmc.core(3), pmc.core2(3), pmc.iaf(3), pmc.k7(3), pmc.k8(3), pmc.p4(3), pmc.p5(3), pmc.p6(3), pmc.soft(3), pmclog(3),
hwpmc(4)HISTORY
The pmc library first appeared in FreeBSD 6.0.
AUTHORS
The Performance Counters Library (libpmc, -lpmc) library was written by Joseph Koshy <jkoshy@FreeBSD.org>.
BSD October 4, 2008 BSD
Check Out this Related Man Page
PMC(1) BSD General Commands Manual PMC(1)NAME
pmc -- performance-monitoring counter interface for command execution
SYNOPSIS
pmc -h
pmc -C
pmc -c event command [options ...]
DESCRIPTION
pmc is a means of using a processor's performance-monitoring counter (PMC) facility to measure various aspects of a program's execution. It
is meant to be used in a fashion similar to time(1).
The arguments are as follows:
-h Display a list of performance counter events available on the system.
-C Cancel any performance counters that are currently running.
-c event
Count the event specified by event while running the command.
DIAGNOSTICS
PMC support is not compiled into the kernel Performance-monitoring counter support has not been compiled into the kernel. It may be
included using the PERFCTRS option. See options(4) for details.
PMC counters are not supported by CPU Performance-monitoring counters are not available for the CPU.
SEE ALSO time(1), options(4)HISTORY
The pmc command first appeared in NetBSD 1.6.
AUTHORS
The pmc command was written by Frank van der Linden <fvdl@wasabisystems.com>. The kernel support for reading performance counters on the
i386 architecture was written by
Jason R. Thorpe <thorpej@zembu.com>.
BUGS
The pmc command currently only supports performance-monitoring counters on the i386 architecture.
BSD October 24, 2000 BSD
Hi, i would like to ask that:
If u need to do something like this:
counter = 1;
so that $($counter) = $1, and when u counter++, $($counter) will become $2. How can we do this? (1 Reply)
In my script i am writing to a counter file the no of processes i had started,
that is each time i start a process, i will increment the content of counter file and also when the process ends i will decrement the content of the file.
after this i do some other activities, by now i want to... (1 Reply)
Hello:
Executing following script i'm getting error:
1=1+1: 0403-058 Assignment requires an lvalue.
It's not assuming the counter but i don't know why.
Some hint?
Thank you very much in advance.
#!/bin/ksh
<path>/tiempos.txt
num_exe=1
TIEMPOS=<path>/tiempos.txt
while ]
do (2 Replies)
Hello Friends,,
I m really a new bee to C programms , please help me with a code..
I found some theads here similar to this but Not able to solve what exactly I want..
suppose I ve txt file as below.
abc.txt
12 23
10 11
131 159
12.2 13.8
Then I want to... (7 Replies)
i am using SCO OpenServer 5
I wan to use bash and have a incrementing counter.
e.g.
#!/bin/bash
counter=1
let "counter+=1"
echo $counter
It says that it does not recognise let
So how should i do it? (5 Replies)
I am new to unix and the following problem is bugging me.:confused:
var1="hello1"
var2="hello2"
var3="hello3"
counter=1
while
do
echo $var$counter
done
the idea here is to display the value of "var" based on the counter.
I am using the korn shell. I used array here but the... (4 Replies)
I have an extractfile (with fields delimited by pipes '|') and I want to prepend a counter based on the below requirements:
- The counter starts at 3.
- The counter increments only if the date (67th field of the extractfile) is different.
Below is what I started off with:
$cnt=2;... (3 Replies)
I'm accessing the TSC register, and using usleep() function to calculate my clock frequency. Basically, I check the current clock, delay for 1 second, and then check the clock again to discover how many clock ticks occur in a second.
The only problem is - my result turns out to be a... (1 Reply)
Hi,
I have to perform the two things;
a) Have to check the previous counter value in the file.
b) After some processess are runned again i have to check the same counter value in the same file.
Here is the file contents.
#File contents of file.txt
CounterValue: 0
Here is the... (2 Replies)
counter=0;
while read line;
do ] && let counter=counter+1; done < input_file.txt
echo $counter
The above code is reading a file line by line and checking whether the filenames mentioned in the file exist or not .
At present the o/p is value of counter
I want to echo out the name of... (5 Replies)
QUESTION: How do I run processes in parallel, so that the counter (in counter.txt) would vary in value (instead of just "0" and "1")? That is, how to not sequentially run inc.sh and dec.sh?
The shared counter (a single number starting as 0) is in a file counter.txt.
counter.sh is (supposed to... (2 Replies)
Hi Experts,
I am a new born trying to start learning UNIX so please be patient.
I have downloaded Free BSD 9.0 Release i386 All recently.Upon extracting it I found four Disc Image File.
FreeBSD-9.0-RELEASE-i386-bootonly
FreeBSD-9.0-RELEASE-i386-disc1
FreeBSD-9.0-RELEASE-i386-dvd1... (1 Reply)
Hi Experts,
I am in need for some help. My competence level on unix is not at all helping me to resolve this. Please help.
My Input for a system command is as under:
Counters are getting pegged each hour. I need to have a difference printed rather than pegged counter values.
Counter... (2 Replies)
Hi all,
I'm using Bash 4.3.8 on an Ubuntu system, and no matter what I try, incrementing a counter won't work. The simplest example would be something like this:
#!/bin/bash
myVar=0
myVar=$((myVar++))
echo myVar
The variable should be 1, but it's always 0. I've tried every increment... (6 Replies)