Sponsored Content
Top Forums Shell Programming and Scripting Shell Script: Run benchmark and cpustat together Post 302931688 by Zam_1234 on Wednesday 14th of January 2015 03:30:46 PM
Old 01-14-2015
Wrench Shell Script: Run benchmark and cpustat together

Hello,
New to Shell scripting here. :-(

I am trying to do the following:
- Run a long benchmark program (Don't need to see the outputs to stdout)
- As long as the benchmark is running, run the "cpustat" command with one particular Performance Counter.
- When the (Multi-thread) benchmark is done running, the cpustat command should also stop.

So far I have been trying different things like:
Code:
cpustat -c pic0=SB_full,pic1=Instr_cnt 1
./long_multithread_benchmark &

kill -9 `pgrep cpustat`

Also, tried using the "while" loop by checking for the $? of the last command:
Code:
./long_benchmark

while [[ $? -neq 0] ]
do
cpustat -c pic0=SB_full,pic1=Instr_cnt 1
done

None of them are working.

Thanks is advance for any suggestions/advice.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run unix commands in a new shell inside a shell script?

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 to Run a shell script from Perl script in Parent shell?

Hi Perl/UNIX experts, I have a problem in running a shell script from my perl script (auto.pl). I run the perl script using perl auto.pl from the shell prompt The shell script picks the files in "input" folder and procesess it. The shell script blue.sh has this code. export... (16 Replies)
Discussion started by: hifake
16 Replies

3. Shell Programming and Scripting

Help need to make a shell script run for ffmpeg vhook watermaking in shell

i have a small problem getting a batxh shell script to run in shell this is the code the problem seems to be centered around the ffmpeg command, something maybe to do with the ' ' wrapping around the vhook part command this is a strange problem , if i take the ffmpeg command and... (1 Reply)
Discussion started by: wingchun22
1 Replies

4. Shell Programming and Scripting

How to run cmds after changing to a new env (shell) in a shell script

Hi, I am using HP-UNIX. I have a requirement as below I have to change env twice like: cadenv <env> cadenv <env> ccm start -d /dbpath ccm tar -xvf *.tar ccm rcv .... mv *.tar BACKUP but after I do the first cadenv <env> , I am unable to execute any of the later commands . ... (6 Replies)
Discussion started by: charlei
6 Replies

5. Shell Programming and Scripting

Run a shell script from one host which connext to remote host and run the commands

I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Discussion started by: SN2009
6 Replies

6. Solaris

CIS Benchmark script for solaris

Hello! Does anyone know where I can find a script that implements the CIS benchmark for Solaris, as described in their pdf file. Virginia Tech had links for it but the pages no longer exists. Thank you! (2 Replies)
Discussion started by: jabentay
2 Replies

7. Solaris

Could you run this benchmark? (Especially if you have a V880 or V890)

Hi all I am currently using a T5120 to write and run some simulation code I've been working on which heavily relies on large matrix multiplication procedures. I am posting this to call out for some of you run and share the results of a simple benchmark I've written to compare the matrix... (1 Reply)
Discussion started by: toguro123
1 Replies

8. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies

9. Cybersecurity

Is there an Automated script for CIS CentOS Linux 7 Benchmark please?

Hi, Apologies if this is not right section to post my requirement. We have a requirement to enhance our Centos 7 Servers' security as per "CIS CentOS Linux 7 Benchmark" ( CIS WorkBench / Home ) that provides guidance for establishing a secure configuration posture for CentOS 7. Just... (2 Replies)
Discussion started by: prvnrk
2 Replies
filebench(1)							   USER COMMANDS						      filebench(1)

NAME
filebench - interprets WML script and generates appropriate filesystem workload SYNOPSIS
filebench [-f <filename>] [-h] DESCRIPTION
Filebench is a file system and storage benchmark that allows to generate a large variety of workloads. Unlike typical benchmarks it is very flexible and allows to minutely specify (any) applications' behaviour using extensive Workload Model Language (WML). Filebench uses load- able workload personalities to allow easy emulation of complex applications (e.g., mail, web, file, and database servers). Filebench is quick to set up and easy to use compared to deploying real applications. It is also a handy tool for micro-benchmarking. Filebench includes many features to facilitate file system benchmarking: o Multiple workload types support via loadable personalities o Ships with more than 40 pre-defined personalities, including the one that describe mail, web, file, and database servers behaviour o Easy to add new personalities using reach Workload Model Language (WML) o Multi-process and multi-thread workload support o Configurable directory hierarchies with depth, width, and file sizes set to given statistical distributions o Support of asynchronous I/O and process synchronization primitives o Integrated statistics for throughput, latency, and CPU cycle counts per system call OPTIONS
-f <filename> use specified file as an input instead of stdin -h Display verbose help EXAMPLES
Run filebench interactively: $ filebench Start filebench interactive shell, filebench prompt will appear after that. filebench> load fileserver Load fileserver personality using load command. filebench> set $dir=/mnt After personality is loaded, tunables of the workload personality can be set. Here we change the benchmark directory to /mnt where the file system we want to benchmark is presumably mounted. filebench> run 60 Start workload for 60 seconds. After 60 seconds of the run the statistics is printed and Filebench exits. Run filebench non-interactively: filebench -f /usr/share/filebench/workloads/fileserver.f Run filebench non-interactively, however, you need to add 'run <time>' to the end of the workload personality file before calling filebench. EXIT STATUS
0 if OK, 1 if workload file is not found. REPORTING BUGS
http://sourceforge.net/tracker/?group_id=133644&atid=727883 revision 01 Sep 1, 2011 filebench(1)
All times are GMT -4. The time now is 11:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy