MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/usr/libexec/webmin/proc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/libexec/webmin/proc/index_cpu.cgi
#!/usr/bin/perl
# index_cpu.cgi

require './proc-lib.pl';
&ui_print_header(undef, $text{'index_title'}, "", "cpu", !$no_module_config, 1);

# Show CPU load and type
&index_links("cpu");
if (defined(&get_cpu_info)) {
	print "<table>\n";
	@c = &get_cpu_info();
	if (@c) {
		print "<tr> <td><b>$text{'index_loadname'}</b></td>\n";
		print "<td>",&text('index_loadnums',
			"<tt>$c[0]</tt>", "<tt>$c[1]</tt>", "<tt>$c[2]</tt>"),
			"</td> </tr>\n";
		if (@c >= 5) {
			print "<tr> <td><b>$text{'index_cpuname'}</b></td>\n";
			print "<td>$c[4] ($c[3] MHz)</td> </tr>\n";
			}
		}
	print "</table><br>\n";
	}

print &ui_columns_start([ $text{'pid'}, $text{'owner'},
			  $text{'cpu'}, $text{'command'} ], 100);
@procs = sort { $b->{'cpu'} <=> $a->{'cpu'} } &list_processes();
@procs = grep { &can_view_process($_->{'user'}) } @procs;
foreach $pr (@procs) {
	$p = $pr->{'pid'};
	local @cols;
	if (&can_edit_process($pr->{'user'})) {
		push(@cols, "<a href=\"edit_proc.cgi?$p\">$p</a>");
		}
	else {
		push(@cols, $p);
		}
	push(@cols, $pr->{'user'});
	push(@cols, $pr->{'cpu'});
	push(@cols, &html_escape(cut_string($pr->{'args'})));
	print &ui_columns_row(\@cols);
	}
print &ui_columns_end();

&ui_print_footer("/", $text{'index'});


Anon7 - 2021