diff options
author | Simon Rettberg | 2022-09-28 16:27:35 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-09-28 16:27:35 +0200 |
commit | e9e6cd58b88981a788dccb171694978ab4f8fe51 (patch) | |
tree | 4d0e711b475728221b23897b8c861fdd6a76698f | |
parent | arcfour is not supported anymore; delete legacy cleaning code (diff) | |
download | tm-scripts-e9e6cd58b88981a788dccb171694978ab4f8fe51.tar.gz tm-scripts-e9e6cd58b88981a788dccb171694978ab4f8fe51.tar.xz tm-scripts-e9e6cd58b88981a788dccb171694978ab4f8fe51.zip |
Ultrastracke
-rwxr-xr-x | useful/ultrastrace.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/useful/ultrastrace.php b/useful/ultrastrace.php index f0a3f0da..727d18d3 100755 --- a/useful/ultrastrace.php +++ b/useful/ultrastrace.php @@ -49,7 +49,7 @@ foreach ($argv as $fname) { $lastLine = $line; $lastTime = $time; } - if (preg_match('#^(\d+\s+)?(\d+:\d+:\d+\.?\d*\s+|\d+\.\d+\s+)?(?<action>access|stat|lstat|stat64|lstat64|readlink|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+|\d+\.\d+\s+)?(?<action>access|stat|lstat|statat|stat64|lstat64|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); @@ -57,19 +57,19 @@ foreach ($argv as $fname) { $str = ':-( ' . $out['lib'] . ' *** (' . (isset($out['err']) ? $out['err'] : 'Unknown Error') . ') (' . $out[ 'action'] . ')'; if (isset($found[$file])) { if (!$unique || !in_array($str, $found[$file])) - $found[$file][] = $str; + $found[$file][$str] = $str; } else { if (!$unique || !isset($failed[$file]) || !in_array($str, $failed[$file])) - $failed[$file][] = $str; + $failed[$file][$str] = $str; } } else { if (isset($failed[$file])) { - $found[$file] = $failed[$file]; + $found[$file] =& $failed[$file]; unset($failed[$file]); } $str = ':-) ' . $out['lib'] . ' (' . $out['action'] . ')'; if (!$unique || !isset($found[$file]) || !in_array($str, $found[$file])) - $found[$file][] = $str; + $found[$file][$str] = $str; } } fclose($fh); |