山下 @ Tokyo-Tech です。
もりさん、メールありがとうございます。
> topを使ってユーザでgrepをかけてみるのは、どうですか?
この方法で行ってみようと思います。
とりあえずは、次のようなシェルスクリプトで対応できそうです。
#!/bin/sh
sleep 1 && top -d 2 b > a.txt &
mpirun -np 4 ./parallel.out
kill -HUP `ps -u \`whoami\` | grep top | tail -1 | awk '{print $1}'`
grep paralle.out a.txt > b.txt
cat b.txt
--
Makoto Yamashita <Makoto.Yamashita@xxxxxxxxxxxxxxx>
Tokyo Institute of Technology
Dept. of Mathematical and Computing Science, Kojima Lab.
presented by one of tpds since 1995.07.29