Revision: 6391
          http://ipcop.svn.sourceforge.net/ipcop/?rev=6391&view=rev
Author:   owes
Date:     2012-02-21 07:54:16 +0000 (Tue, 21 Feb 2012)
Log Message:
-----------
Add status and memory size detection for squidGuard

Modified Paths:
--------------
    ipcop/trunk/src/libs/general-functions.pl
    ipcop/trunk/updates/2.1.0/ROOTFILES.i486-2.1.0

Modified: ipcop/trunk/src/libs/general-functions.pl
===================================================================
--- ipcop/trunk/src/libs/general-functions.pl   2012-02-21 07:44:44 UTC (rev 
6390)
+++ ipcop/trunk/src/libs/general-functions.pl   2012-02-21 07:54:16 UTC (rev 
6391)
@@ -1008,6 +1008,29 @@
     $cmd =~ /(^[a-z]+)/;
     $exename = $1;
 
+    if ($exename eq 'squidguard') {
+        # Special case for squidguard, no PID file(s) to check.
+        my $counter = 0;
+        my $output = '';
+
+        $output = `/bin/ps -o vsz= -C squidGuard`;
+        foreach my $line (split(/\n/, $output)) {
+            $counter++;
+            $vmsize = $vmsize + int($line);
+        }
+        if ($counter) {
+                if ($showsize) {
+                    $status = "<td align='center' >$vmsize kB</td>";
+                }
+                else {
+                    $status = "";
+                }
+                $status .= "<td align='center' 
class='ipcop_running'>$Lang::tr{'running'}</td>";
+        }
+        
+        return($status);
+    }
+
     if ($exename eq 'dhcpd') {
         # Special case for dnsmasq as DHCP server. dnsmasq is both DNS proxy 
and DHCP server, we want to
         # show both status. For DHCP we check if DHCP is enabled on at least 1 
interface first.

Modified: ipcop/trunk/updates/2.1.0/ROOTFILES.i486-2.1.0
===================================================================
--- ipcop/trunk/updates/2.1.0/ROOTFILES.i486-2.1.0      2012-02-21 07:44:44 UTC 
(rev 6390)
+++ ipcop/trunk/updates/2.1.0/ROOTFILES.i486-2.1.0      2012-02-21 07:54:16 UTC 
(rev 6391)
@@ -11,6 +11,7 @@
 /home/httpd/cgi-bin/time.cgi
 /home/httpd/cgi-bin/urlfilter.cgi
 /home/httpd/html/images/redirect-background.png
+/usr/lib/ipcop/general-functions.pl
 /usr/local/bin/blacklistupdate.pl
 /usr/share/locale/af_ZA/LC_MESSAGES/ipcop.mo
 /usr/share/locale/bg_BG/LC_MESSAGES/ipcop.mo

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to