Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
executable file 29 lines (23 sloc) 768 Bytes
#!/usr/bin/perl
# This code is a part of Slash, and is released under the GPL.
# Copyright 1997-2005 by Open Source Technology Group. See README
# and COPYING for more information, or see http://slashcode.com/.
# $Id$
###############################################################################
# this gives a process list of the database
###############################################################################
@p=split /\|\n/, `mysqladmin -u root processlist`;
foreach(@p) {
if(!/^\+/ and !/Sleep/ and !/localhost/) {
s/\s/ /g;
s/ / /g;
s/[^_\'\-\+\.A-Z0-9\(\) ,=\|]//gi;
s/SELECT(.*)FROM/SELECT:FROM/g;
my @x=split(/\|/);
$x[3]=~s/\.dn\.net//g;
my $s="$x[3]$x[6]\t$x[8]";
$s=substr ($s,1,75);
print "$s\n";
}
}
print "\n";
Something went wrong with that request. Please try again.