#!/bin/ksh
# @(#) s1 Demonstrate capture of timing data with ksh.
echo " pdksh version: $KSH_VERSION"
rm -f a.log b.log
echo
echo " Running with time."
{ time ls home test; } 2>&1 | tee -a a.log
echo
echo " Running with /usr/bin/time."
/usr/bin/time ls home test 2>&1 | tee -a b.log
echo
echo " Results of time in a.log:"
cat a.log
echo
echo " Results of /usr/bin/time in b.log:"
cat b.log
exit 0
Producing:
Code:
% ./s1
pdksh version: @(#)PD KSH v5.2.14 99/07/13.2
Running with time.
ls: home: No such file or directory
ls: test: No such file or directory
0.00s real 0.00s user 0.00s system
Running with /usr/bin/time.
ls: home: No such file or directory
ls: test: No such file or directory
Command exited with non-zero status 1
0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+177minor)pagefaults 0swaps
Results of time in a.log:
ls: home: No such file or directory
ls: test: No such file or directory
0.00s real 0.00s user 0.00s system
Results of /usr/bin/time in b.log:
ls: home: No such file or directory
ls: test: No such file or directory
Command exited with non-zero status 1
0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+177minor)pagefaults 0swaps
This is with pdksh, see man ksh for details, especially the entry on the builtin command time ... cheers, drl
my pragram runs with 3 threads, 2 work threads, one main thread. the 2 work threads run with the same mode and the same code. but now, one of the work thread can't work, and it uses the cpu more than 80%, sometimes uses 100% cpu resource. the another work thread work well.
when I viewed the HP... (2 Replies)
Hi guys, I had a question last week where I asked how I check from a website hosted on windows if a process is running on on of our unix servers. Vino and Shell Life kindly replied with a perl script:
if qm') -gt 0 ] ; then
echo "Site is up"
else
echo "Site is down."
# start the... (1 Reply)
I have a crontab as below:
PATH=/usr/local/sbin:/bin/:..... etc etc
0 8 * * * /home/user/jobs/poll.sh 2>/dev/null 1>/dev/null
Now the script poll.sh is called at correct time and executes.
This is how poll.sh looks like
#!/bin/bash... (2 Replies)
Hi, please help with below time conversion to minutes.
one column values:
2 minutes 16 seconds 420 msec
43 seconds 750 msec
0 days 3 hours 29 minutes 58 seconds 480 msec
11 seconds 150 msec
I need output in minutes(total elapsed time in minutes) (2 Replies)
Hi all,
System Ubuntu 16.04.3 LTS
i have the following log
INFO 2019-02-07 15:13:31,099 module.py:700] default: "POST /join/8550614e-3e94-4fa5-9ab2-135eefa69c1b HTTP/1.0" 500 2042
INFO 2019-02-07 15:13:31,569 module.py:700] default: "POST /join/6cb9c452-dcb1-45f3-bcca-e33f5d450105... (15 Replies)
Hey guys, I was wondering. When I enter a command in the terminal -wcl for a word count, where is that program located in the kernel? (7 Replies)
Discussion started by: Circuits
7 Replies
LEARN ABOUT SUSE
ocf_heartbeat_evmsscc
OCF_HEARTBEAT_EVMSSC(7) OCF resource agents OCF_HEARTBEAT_EVMSSC(7)NAME
ocf_heartbeat_EvmsSCC - Manages EVMS Shared Cluster Containers (SCCs) (deprecated)
SYNOPSIS
EvmsSCC [start | stop | notify | status | monitor | meta-data]
DESCRIPTION
Deprecation warning: EVMS is no longer actively maintained and should not be used. This agent is deprecated and may be removed from a
future release. -- Resource script for EVMS shared cluster container. It runs evms_activate on one node in the cluster.
SUPPORTED PARAMETERS
ignore_deprecation
If set to true, suppresses the deprecation warning for this agent. (optional, boolean, default false)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 60.
stop
Stops the resource. Suggested minimum timeout: 60.
notify
Suggested minimum timeout: 60.
status
Performs a status check. Suggested minimum timeout: 10. Suggested interval: 10.
monitor
Performs a detailed status check. Suggested minimum timeout: 10. Suggested interval: 10.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5.
EXAMPLE
The following is an example configuration for a EvmsSCC resource using the crm(8) shell:
primitive example_EvmsSCC ocf:heartbeat:EvmsSCC
op monitor depth="0" timeout="10" interval="10"
SEE ALSO
http://www.linux-ha.org/wiki/EvmsSCC_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
resource-agents 1.0.3 07/05/2010 OCF_HEARTBEAT_EVMSSC(7)