/usr/share/doc/pbnj/EXAMPLES is in pbnj 2.04-4.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | SINGLE SCAN
Scan Localhost
sudo ./scanpbnj 127.0.0.1
Mail latest changes in csv format to user bill
sudo ./outputpbnj -q latestinfo -t csv |mail -s "PBNJ Latest Info" bill
AUTOMATED SCANS WITH CRONJOBS
Copy the following into your /etc/crontab
# scan of 10 net every 2 hours and email the latest changes to root
16 */2 * * * root /root/bin/scan
# monthly report of class c and email to root
59 1 1 * * root /root/bin/monthly-report
Scan Every 2 Hours:
/root/bin/scan contains the following:
#!/bin/sh
scanpbnj 192.168.10.\*
outputpbnj -q latestinfo -t csv | mail -s "PBNJ LatestInfo `date`" root
Monthly Report:
/root/bin/monthly-report contains the following:
#!/bin/sh
MONTHYEAR=`date +%B-%Y`
cd /root/
mkdir report-$MONTHYEAR
cd report-$MONTHYEAR
scanpbnj 192.168.10.\*
outputpbnj -q monthlyreport -t csv | mail -s "PBNJ Month Report `date
+%B+%r`" root
|