11-08-2019
Hi MonilGome...
I will add to vbe's post and say if you want any of your code, whether it be a shell script, a dedicated compiled executable or a separately interpreted script, to be portable then make sure it is POSIX compliant; also if it is a dedicated executable and you intend it to be used as along with other utilities make sure you include a piping facility.
For example: echo "3 + 7" | bc ...
Also 'zsh', along with 'ksh[93]', has floating point arithmetic; DO NOT take this for granted, POSIX compliant shells only have integer arithmetic ONLY - so beware.
As a hobbyist coder, this is just my 5 pennoth...
Bazza...
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi ,
I have wrote a telnet clinet application to interact with remote system . This program takes the screen shots for every interaction and send back to us. After connecting to remote machine , i want to call tip utility to interact with a device which is connected to one remote system. Now my... (0 Replies)
Discussion started by: prasadvsda
0 Replies
2. SCO
how can zip a directory in sco unix and transfer it to any other system using ftp. and finally how can i unzip it
regards,
ajay (1 Reply)
Discussion started by: ajay234
1 Replies
3. Shell Programming and Scripting
Kindly help me to build the script similar to VLOOKUP function of MS Excell. (5 Replies)
Discussion started by: hjoshi
5 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Can anyone explain me the use of age utility and how it works?
Looking forward reply...
Thanks,
Venkatesh. (1 Reply)
Discussion started by: venkatesht
1 Replies
5. UNIX for Dummies Questions & Answers
Hello everyone.
Could you please advise of what would be the best Unix (Debian 4) program for regular (daily or weekly) incremental backups?
I'm not sure whether the backups will be stored on a "backup" drive on the same system or on an external "backup" system, but we would like to have a... (2 Replies)
Discussion started by: nottrobin
2 Replies
6. Programming
C calling convention we all know defines a way how the parameters are pushed onto the stack.
My question is when and how does this C calling conventions matters to a user?
When the user will have to bother about the calling conventions in his project? (5 Replies)
Discussion started by: rupeshkp728
5 Replies
7. UNIX for Dummies Questions & Answers
I am looking for a utility that does file hashing in unix. ...Please let me know of any good easy to use utility (3 Replies)
Discussion started by: jbjoat
3 Replies
8. UNIX for Dummies Questions & Answers
is there a typographic convention that is followed in the man pages.
where could a description be found.
at this time i am in man stty and the author uses upper case in some places.
and my brain is just burning to a fizzle while studying a book on bash and trying to stay in scope of the... (1 Reply)
Discussion started by: cowLips
1 Replies
9. UNIX for Beginners Questions & Answers
Hi,
I work on a Middleware application which is installed on Windows, but its file System is on HP UNIX. I am supposed to change the SMTP host address for my application. But I am not able to find the file where the old SMTP host would have been configured/hardcoded. Can anyone assist me on this... (2 Replies)
Discussion started by: jhilmil
2 Replies
10. Cybersecurity
Hey guys, not sure should I post it here or in 'What is on Your Mind?'
I'm discussing usage of DSL (domain specific language) in security tools with my colleagues. We haven't been able to reach an agreement over naming conventions.
There are many tools using DSL: splunk, sumologic,... (2 Replies)
Discussion started by: Tobby P
2 Replies
LEARN ABOUT OSX
chudremotectrl
CHUDREMOTECTRL(1) General Commands Manual CHUDREMOTECTRL(1)
NAME
chudRemoteCtrl - start or stop the collection of performance monitor data in a performance monitor remote server application.
SYNOPSIS
chudRemoteCtrl [ -m ] [ executable [args... ] ]
chudRemoteCtrl -s label
chudRemoteCtrl -e
chudRemoteCtrl -k PID
DESCRIPTION
chudRemoteCtrl is a command line tool that allows for the collection of performance data by any active performance monitor remote server
application. There are currently two CHUD Tools that can be put in remote performance monitor server mode: MONster, and Shark (as well as
their command line counterparts). Typically, chudRemoteCtrl is invoked on the command line or in a shell script, followed by the path to an
executable to be measured and its arguments. chudRemoteCtrl issues a chudStartRemotePerfMonitor message immediately after launching the
specified target program. When the launched program terminates, chudRemoteCtrl issues a chudStopRemotePerfMonitor message, and then exits.
When the '-s', '-e' or '-k PID' options are used, no program is launched.
OPTIONS
-r seconds: If the 'chudStartRemotePerfMonitor' message fails to either acquire or start the remote monitoring service, then keep try-
ing to start again, until the specified number of seconds has elapsed. The same thing is true of the '-e' option. If there is a '-r
<seconds>' argument on the command line, and a failure occurs trying to stop the remote profiling program, the stop message will be
sent again until the retry time limit is reached.
-s label: Issue a chudStartRemotePerfMonitor message with the specified label and exit. A 'label' is a string of up to 32 characters.
-e Issue a chudStopRemotePerfMonitor message and exit.
-q silence some of the non-essential warning and error output.
-kPID Send a UNIX signal (SIGUSR1 to start profiling, SIGUSR2 to stop profiling) to the specified process-id. For example, if a command-
line profiling tool, is running as PID 4267, using '-k 4267' along with a '-s' will send a SIGUSR1 to the command-line profiling
tool and it will start sampling, while '-k 4267' along with a '-e' will send a SIGUSR2 to the command-line profiling tool and it
will stop sampling. A 'start' example: % chudRemoteCtrl -s session_42 -k 4267. And a 'stop' example: % chudRemoteCtrl -e -k 4267.
The command-line CHUD tool 'shark' responds to UNIX signals and toggles performance profiling. You can repeatedly send '-s <label>
-k <PID#>' to shark and it will toggle profiling start or stop. Sending '-e -k <PID#>' to shark will stop sampling (if it's run-
ning) and cause shark to EXIT.
-m Set the performance monitor mark bit in the main thread of the launched child process.
DIAGNOSTICS
chudRemoteCtrl returns a zero (0) upon success and a non-zero value on failure.
BUGS
Please send your comments, suggestions and bug reports to: perftools-feedback@group.apple.com
SEE ALSO
monster(1), shark(1)
CHUD
6 October 2003 CHUDREMOTECTRL(1)