- modem1.pl
- modem2.pl
Both are very similar and print output in a single line in key:value key:value format in a single line.
Interestingly, the modem1.pl works and populates data without any issues, but modem2.pl does not.
Code: Select all
07/11/2015 12:20:39 PM - CMDPHP: Poller[0] Host[3] DS[26] CMD: perl /Users/kinimod/cacti/scripts/modem2.pl, output: U
07/11/2015 12:20:39 PM - CMDPHP: Poller[0] Host[3] DS[26] WARNING: Result from CMD not valid. Partial Result: U
Code: Select all
for (@keys) {
print "$_:" . $data{$_} . " ";
}
Code: Select all
for (@DownSnR, @DownPWR, @UpPWR) {
print "$_" . " ";
}
Code: Select all
DownSnR1:36 DownSnR2:35 DownSnR3:35 DownSnR4:35 DownSnR5:34 DownSnR6:34 DownSnR7:35 DownSnR8:34 DownPWR1:7 DownPWR2:5 DownPWR3:6 DownPWR4:5 DownPWR5:4 DownPWR6:4 DownPWR7:5 DownPWR8:4 UpPWR1:45 UpPWR2:45 UpPWR3:46 UpPWR4:49
I want to use my modem2.pl script because it's more efficient and future-proof.
Any ideas? Both modem1.pl and modem2.pl have exactly the same read/write/execute attributes and same owner:group. I searched the forums for this issue without finding a working solution.