summaryrefslogtreecommitdiffstats
path: root/useful
diff options
context:
space:
mode:
authorSimon Rettberg2013-04-29 16:22:59 +0200
committerSimon Rettberg2013-04-29 16:22:59 +0200
commit8a39dba9bda619f0429c158ff176421b6b4a3b39 (patch)
treec6d89f7a27d5a2dea397c4afe38807efbdfa185c /useful
parent- Make make -j match cpu count (diff)
downloadtm-scripts-8a39dba9bda619f0429c158ff176421b6b4a3b39.tar.gz
tm-scripts-8a39dba9bda619f0429c158ff176421b6b4a3b39.tar.xz
tm-scripts-8a39dba9bda619f0429c158ff176421b6b4a3b39.zip
Make apt-get non-interactive
Update ultra-strace to support readlink calls
Diffstat (limited to 'useful')
-rwxr-xr-xuseful/ultrastrace.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/useful/ultrastrace.php b/useful/ultrastrace.php
index cb7352e0..ab45e2c2 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('#^(\d+\s+)?(?<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|openat|execve)\("(?<lib>[^"]*[^"]*[^/])".*\)\s+=\s+(?<ret>\S+)(\s+(?<err>\S+)\s+|$)#', $line, $out) < 1) continue;
+ if (preg_match('#^(\d+\s+)?(\d+:\d+:\d+\.?\d*\s+)?(?<action>readlink|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);