I have one application like this:
filebench -f fileserver.f
and it output is:
Filebench Version 1.4.9.1
WARNING: Could not open /proc/sys/kernel/shmmax file!
It means that you probably ran Filebench not as a root. Filebench will not increase shared
region limits in this case, which can lead to the failures on certain workloads.
3297: 0.000: Allocated 170MB of shared memory
3297: 0.001: File-server Version 3.0 personality successfully loaded
3297: 0.001: Creating/pre-allocating files and filesets
3297: 0.007: Fileset bigfileset: 10000 files, 0 leafdirs, avg dir width = 20, avg dir depth = 3.1, 1240.757MB
3297: 0.009: Removed any existing fileset bigfileset in 1 seconds
3297: 0.009: making tree for filset /home/njupudi/workloads/bigfileset
3297: 0.014: Creating fileset bigfileset...
3297: 6.795: Preallocated 7979 of 10000 of fileset bigfileset in 7 seconds
3297: 6.795: waiting for fileset pre-allocation to finish
3301: 6.795: Starting 1 filereader instances
3302: 6.796: Starting 50 filereaderthread threads
3297: 8.183: Running...
3297: 13.184: Run took 5 seconds...
3297: 13.279: Per-Operation Breakdown
statfile1 4674ops 918ops/s 0.0mb/s 0.0ms/op 1575us/op-cpu [0ms - 0ms]
deletefile1 4674ops 918ops/s 0.0mb/s 12.0ms/op 13256us/op-cpu [0ms - 1170ms]
closefile3 4697ops 922ops/s 0.0mb/s 0.0ms/op 1601us/op-cpu [0ms - 0ms]
readfile1 4697ops 922ops/s 113.7mb/s 0.0ms/op 1720us/op-cpu [0ms - 0ms]
openfile2 4701ops 923ops/s 0.0mb/s 0.0ms/op 1778us/op-cpu [0ms - 20ms]
closefile2 4701ops 923ops/s 0.0mb/s 0.0ms/op 1544us/op-cpu [0ms - 0ms]
appendfilerand1 4701ops 923ops/s 7.3mb/s 1.4ms/op 2314us/op-cpu [0ms - 203ms]
openfile1 4714ops 926ops/s 0.0mb/s 0.0ms/op 1773us/op-cpu [0ms - 21ms]
closefile1 4714ops 926ops/s 0.0mb/s 0.0ms/op 1597us/op-cpu [0ms - 0ms]
wrtfile1 4714ops 926ops/s 116.4mb/s 21.4ms/op 10013us/op-cpu [0ms - 658ms]
createfile1 4724ops 928ops/s 0.0mb/s 0.1ms/op 1897us/op-cpu [0ms - 39ms]
3297: 13.279: IO Summary: 51711 ops, 10153.731 ops/s, (922/1849 r/w), 237.8mb/s, 337us cpu/op, 11.6ms latency
3297: 13.279: Shutting down processes
Here for initialization, the application takes around 2-3 seconds and then starts running. We can see in the output like this:
3297: 8.183: Running...
After this the application starts running for a specified time. Meanwhile, I want to start another application (more precisely a shell script) as soon as I see the "Running..." on the console. Is there any way to capture the output of console and compare it with "Running..." and then start shell script while this command is already running?
filebench -f fileserver.fand check the output containsRunning, then call yourshellscript.