Search Results

Search found 2 results on 1 pages for 'dare2be'.

Page 1/1 | 1 

  • Force snmptrapd to log only v2c traps

    - by dare2be
    Hello, I am in the middle of writing new network management software for my University. However, I need to implement a quickie solution to handle specific traps. Right now, my snmptrapd is configured to accept any traps, i.e.: # /etc/snmp/snmptrapd.conf authCommunity log publicString logOption f /var/log/snmptrapd.log format1 "" format2 "%02.2h:%02.2j %b %N\n" What I basically want to do is to log ONLY v2c traps. I intended to do it with setting the format for v1 traps to null (format 1 "") but snmptrapd keeps sending "" to its log. Does anybody know a workaround for this?

    Read the article

  • Call from a singleton class to a function which in turn calls that class's method

    - by dare2be
    Hello, I am still looking for a way to phrase it properly (I'm not a native speaker...). So I have this class SQL which implements the singleton pattern (for obvious reasons) and I also have this function, checkUsr(), which queries the database using one of SQL's methods. Everything works fine as long as I don't call checkUsr() from within the SQL class. When I do so, the scripts just exits and a blank page is displayed - no errors are returned, no exception is thrown... What's happening? And how do I work around this problem? EDIT: class SQL { public static function singleton() { static $instance; if(!isset($instance)) $instance = new SQL; return $instance; } public function tryLoginAuthor( $login, $sha1 ) { (...) } } function checkUsr() { if (!isset($_SESSION['login']) || !isset($_SESSION['sha1'])) throw new Exception('Not logged in', 1); $SQL = SQL::singleton(); $res = $SQL->tryLoginAuthor($_SESSION['login'], $_SESSION['sha1']); if (!isset($res[0])) throw new Exception('Not logged in', 1); }

    Read the article

1