They didn't literally mean you to give it the arguments 'arg1' and 'arg2'. You're supposed to give it numbers -- they determine the data size and number of loops. Giving it the strings 'arg1' and 'arg2' cause them both to be zero, which makes it do no work -- zero loops over zero elements.
Last edited by Corona688; 07-18-2013 at 12:47 PM..
I wondered if someone could point out the differences between the time commmand and usr/bin/time and the accuracy one might have over another.
Also, is there a website or two a person could maybe link for me to describe the differences?
Thank you for your time. (2 Replies)
Our Aix Unix has one issue.
If I type xedit &
after 30 minutes, xedit auto shut down.
If I type xedit
xedit will run forward.
I feel this & doesn't perform as it should be.
When I use &, system consider this process as idle.
How to fix this issue?
Does this mean unix env... (12 Replies)
I have noticed a few posts asking questions about c shell scripting these past few days. This a good read for those that currently or are thinking about writing a csh script:
Csh Programming Considered Harmful (9 Replies)
How can I run a here document on just one line? I ask, because I need to issue it from C++ as a system() or similar command and for security reasons I don't want to write out a shell script file from the program and run it.
For example, how could I write:
passwd test <<EOF
n3wp3ss... (3 Replies)
Hi friends,
I hope everyone is doing well and fine. I have always been hearing that C/C++ are relatively low-level as compared to Java/C# etc. Could you please tell me some low-level qualities of C/C++? And I think disk deframenters are written in C/C++, please correct me if I am wrong. And please... (5 Replies)
Ive a problem that I'm reaching out for help.
Ive written (With bits and pieces) of script that is not running as expected or is having an issue causing processes to spiral out of control.
The script does this:
Unloads a UV database server
Tars up a few folders
Transfers the file to... (11 Replies)
I am trying to issue the time command on a program so I can see execution times but it is returning all zeroes. Like this:
time pdriver arg1 arg2
0.000u 0.000s 0:00.00 0.0% 0+0k 0+0io 0pf+0w
"0+0k 0+0io 0pf+0w" --> The "0+0io" may change sometimes to a different number.
How can I run the... (2 Replies)
Greetings all,
On a RedHat System - I am issuing a command from script.sh that will add a file extension to a listing of files in a directory. It works, but I need to script from having an extension added as well.
Here is what I have tried to no luck:
for file in `ls * | awk ' /\./{print... (6 Replies)
Hi,
Using ksh, I have set up aliases (which work fine) in my user's .profile like this:
alias ll = 'ls -lrt'
alias cls = 'clear'
How do I call these same aliases so that they will work after issuing this: ? su - user
I do not want to add aliases to the su shell's .profile or .kshrc. (7 Replies)
Discussion started by: ocbit
7 Replies
LEARN ABOUT DEBIAN
ctr1
KTR(9) BSD Kernel Developer's Manual KTR(9)NAME
CTR0, CTR1, CTR2, CTR3, CTR4, CTR5 -- kernel tracing facility
SYNOPSIS
#include <sys/param.h>
#include <sys/ktr.h>
extern int ktr_cpumask;
extern int ktr_entries;
extern int ktr_extend;
extern int ktr_mask;
extern int ktr_verbose;
extern struct ktr_entry ktr_buf[];
void
CTR0(u_int mask, char *format);
void
CTR1(u_int mask, char *format, arg1);
void
CTR2(u_int mask, char *format, arg1, arg2);
void
CTR3(u_int mask, char *format, arg1, arg2, arg3);
void
CTR4(u_int mask, char *format, arg1, arg2, arg3, arg4);
void
CTR5(u_int mask, char *format, arg1, arg2, arg3, arg4, arg5);
void
CTR6(u_int mask, char *format, arg1, arg2, arg3, arg4, arg5, arg6);
DESCRIPTION
KTR provides a circular buffer of events that can be logged in a printf(9) style fashion. These events can then be dumped with ddb(4),
gdb(1) or ktrdump(8).
Events are created and logged in the kernel via the CTRx macros. The first parameter is a mask of event types (KTR_*) defined in
<sys/ktr.h>. The event will be logged only if any of the event types specified in mask are enabled in the global event mask stored in
ktr_mask. The format argument is a printf(9) style format string used to build the text of the event log message. Following the format
string are zero to five arguments referenced by format. Each event is logged with a file name and source line number of the originating CTR
call, and a timestamp in addition to the log message.
The event is stored in the circular buffer with supplied arguments as is, and formatting is done at the dump time. Do not use pointers to
the objects with limited lifetime, for instance, strings, because the pointer may become invalid when buffer is printed.
Note that the different macros differ only in the number of arguments each one takes, as indicated by its name.
The ktr_entries variable contains the number of entries in the ktr_buf array. These variables are mostly useful for post-mortem crash dump
tools to locate the base of the circular trace buffer and its length.
The ktr_mask variable contains the run time mask of events to log.
The CPU event mask is stored in the ktr_cpumask variable.
The ktr_verbose variable stores the verbose flag that controls whether events are logged to the console in addition to the event buffer.
EXAMPLES
This example demonstrates the use of tracepoints at the KTR_PROC logging level.
void
mi_switch()
{
...
/*
* Pick a new current process and record its start time.
*/
...
CTR3(KTR_PROC, "mi_switch: old proc %p (pid %d)", p, p->p_pid);
...
cpu_switch();
...
CTR3(KTR_PROC, "mi_switch: new proc %p (pid %d)", p, p->p_pid);
...
}
SEE ALSO ktr(4), ktrdump(8)HISTORY
The KTR kernel tracing facility first appeared in BSD/OS 3.0 and was imported into FreeBSD 5.0.
BUGS
Currently there is one global buffer shared among all CPUs. It might be profitable at some point in time to use per-CPU buffers instead so
that if one CPU halts or starts spinning, then the log messages it emitted just prior to halting or spinning will not be drowned out by
events from the other CPUs.
The arguments given in CTRx() macros are stored as u_long, so do not pass arguments larger than size of an u_long type. For example passing
64bit arguments on 32bit architectures will give incorrect results.
BSD November 30, 2008 BSD