04-15-2017
Did you consider
time?
man time:
Quote:
time - run programs and summarize system resource usage
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell.
So scenario is that
- I need to have one shell script which is ran as a part of crontab
- in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies
2. Shell Programming and Scripting
How do I create a K Shell which would silently (without user input) logon to Oracle and
run an SQL script?
Any help will be greatly appreciated.
Steve (1 Reply)
Discussion started by: stevefox
1 Replies
3. Shell Programming and Scripting
I have the code like this :
shell script continues ...
....
expect -c"
spawn telnet $ip
expect "login:"
send \"$usrname\r\"
expect "Password:"
send \"$passwd\r\"
expect "*\>"
send \"$cmdstr\r\"
... (1 Reply)
Discussion started by: robbiezr
1 Replies
4. Shell Programming and Scripting
Hello
I am trying to run a python program using shell script, which takes a single argument from a file.
This file has one entry per line :
1aaa
2bbb
3ccc
4ddd
5eee
...
...
...
My shell script runs the program, only for the last entry :
#!/bin/sh
IFS=$'\n'
for line in $(cat... (2 Replies)
Discussion started by: ad23
2 Replies
5. Shell Programming and Scripting
Hi everyone,
when executing this command in unix:
echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error.
here is content of my script:
tdbsrvr$ vi hc.sh
"hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies
6. Shell Programming and Scripting
I have N number of python scripts which i am receiving from REST web server and i am saving them in /home/mandar/ . Now i want to write a script to run all the python scripts from this directory and monitor them every minute...if any process is dead or hung it should be restarted by this script.
... (0 Replies)
Discussion started by: Mandar Nandale
0 Replies
7. Shell Programming and Scripting
I have to run some shell scripts in Windows using Cygwin. I am able to achieve that using
%BASH% --login -i "/cygdrive/d/script.sh"
, where %BASH% is an environment variable in Windows set to
C:\cygwin\bin\bash.exe.
I have a created a Cygwin environment variable $EXE_PATH =... (3 Replies)
Discussion started by: HemanthJayasimh
3 Replies
8. Shell Programming and Scripting
Hi ,
I have 4 scripts example script1,script2,script3,script4 .
I have to run script1,script2 and script3 parallely since this 3 scripts dont have dependencies .
Once script1,script2 and script3 got completed successfully , I have to trigger script4.
Can someone help me on this how to... (10 Replies)
Discussion started by: vinothsekark
10 Replies
9. Shell Programming and Scripting
Hello,
Just wondered if there is any possibility to run a command at sharp time inside a script in linux. My question is not about crontab
Example:
#!/bin/bash
cd /home/database
for i in *
do
command 1
if time is 19:00, day is Monday then run command2
if time is 20:00, day is... (10 Replies)
Discussion started by: baris35
10 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
Would like to write a Script which will run between 11am to 3 pm and send the results to output.txt.
Please suggest. (2 Replies)
Discussion started by: vasuvv
2 Replies
LEARN ABOUT PLAN9
s390_runtime_instr
S390_RUNTIME_INSTR(2) System Calls Manual S390_RUNTIME_INSTR(2)
NAME
s390_runtime_instr - enable/disable s390 CPU run-time instrumentation
SYNOPSIS
#include <asm/runtime_instr.h>
int s390_runtime_instr(int command, int signum);
DESCRIPTION
The s390_runtime_instr() system call starts or stops CPU run-time instrumentation for the calling thread.
The command argument controls whether run-time instrumentation is started (S390_RUNTIME_INSTR_START, 1) or stopped (S390_RUN-
TIME_INSTR_STOP, 2) for the calling thread.
The signum argument specifies the number of a real-time signal. The real-time signal is sent to the thread if the run-time instrumentation
buffer is full or if the run-time-instrumentation-halted interrupt occurred.
RETURN VALUE
On success, s390_runtime_instr() returns 0 and enables the thread for run-time instrumentation by assigning the thread a default run-time
instrumentation control block. The caller can then read and modify the control block and start the run-time instrumentation. On error, -1
is returned and errno is set to one of the error codes listed below.
ERRORS
EINVAL The value specified in command is not a valid command or the value specified in signum is not a real-time signal number.
ENOMEM Allocating memory for the run-time instrumentation control block failed.
EOPNOTSUPP
The run-time instrumentation facility is not available.
VERSIONS
This system call is available since Linux 3.7.
CONFORMING TO
This Linux-specific system call is available only on the s390 architecture. The run-time instrumentation facility is available beginning
with System z EC12.
NOTES
Glibc does not provide a wrapper for this system call, use syscall(2) to call it.
SEE ALSO
syscall(2), signal(7)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
Linux Programmer's Manual 2017-09-15 S390_RUNTIME_INSTR(2)