diff options
author | Simon Rettberg | 2013-04-24 12:27:21 +0200 |
---|---|---|
committer | Simon Rettberg | 2013-04-24 12:27:21 +0200 |
commit | 78605f80f5f488e4f56e0e78cd6d3e7b7675a4a4 (patch) | |
tree | a9669bdd92b07bb0478ea635b9ac6e480a83f663 /useful | |
parent | Merge branch 'master' of dnbd3:openslx-ng/tm-scripts (diff) | |
download | tm-scripts-78605f80f5f488e4f56e0e78cd6d3e7b7675a4a4.tar.gz tm-scripts-78605f80f5f488e4f56e0e78cd6d3e7b7675a4a4.tar.xz tm-scripts-78605f80f5f488e4f56e0e78cd6d3e7b7675a4a4.zip |
strace tool update
Diffstat (limited to 'useful')
-rwxr-xr-x | useful/ultrastrace.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/useful/ultrastrace.php b/useful/ultrastrace.php index 7ec755e9..cb7352e0 100755 --- a/useful/ultrastrace.php +++ b/useful/ultrastrace.php @@ -24,7 +24,7 @@ foreach ($argv as $fname) { $lineNo++; $line = fgets($fh); // open("/lib/x86_64-linux-gnu/tls/x86_64/libkdeui.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) - if (preg_match('#^(?<h>\d+):(?<m>\d+):(?<s>\d+\.\d+)\s#', $line, $out) >= 1) { + if (preg_match('#^(?<h>\d+):(?<m>\d+):(?<s>\d+(\.\d+)?)\s#', $line, $out) >= 1) { $time = parseTime($out); if (isset($lastLine)) { if ($time < $lastTime) $lastTime -= 86400; @@ -35,7 +35,7 @@ foreach ($argv as $fname) { $lastLine = $line; $lastTime = $time; } - if (preg_match('#^(\d+:\d+:\d+\.\d+\s+)?(?<action>open|execve)\("(?<lib>[^"]*[^"]*[^/])".*\)\s+=\s+(?<ret>\S+)(\s+(?<err>\S+)\s+|$)#', $line, $out) < 1) continue; + if (preg_match('#^(\d+:\d+:\d+\.?\d*\s+)?(?<action>open|openat|execve)\("(?<lib>[^"]*[^"]*[^/])".*\)\s+=\s+(?<ret>\S+)(\s+(?<err>\S+)\s+|$)#', $line, $out) < 1) continue; //echo "Match: {$out['lib']} -> {$out['ret']} ({$out['err']})\n"; $file = basename($out['lib']); $file = preg_replace('/\.so(\.\d+)*$/', '', $file); |