This post is more than 5 years old
37 Posts
0
1517
Device operations using nsradmin
Hi , sometimes I need to provide device information to our monitoring system. So I write the script to query "name" and "enabled" attributes of NSR devices. This is a part of this script which forms input to nsradmin:
while read line
do
echo -e ' . name:'$line';type:NSR device'>inpnsradmin.txt
echo -e 'show name;enabled'>>inpnsradmin.txt
echo -e 'print'>>inpnsradmin.txt
nsradmin -i inpnsradmin.txt>>devsstate.txt
done
Device name is correct
But the results is:
Current query set
No resources found for query:
name: rd=devname/dev/rmt9.1;
type: NSR device;
When I try to do the same thing using nsradmin interface without script everything is OK
. name:"rd=devname:/dev/rmt9.1";type:NSR device
show name;enabled
nsradmin> print
name: "rd=devname:/dev/rmt9.1";
enabled: Yes;
Where I was wrong?
Thank you for your time
ble1
2 Intern
2 Intern
•
14.3K Posts
0
April 7th, 2016 15:00
: is missing or did you remove it? Also, pay attention to quotes.
Godzy
37 Posts
0
April 8th, 2016 01:00
I removed :. But in fact, device name is correct
Godzy
37 Posts
0
April 8th, 2016 01:00
Thank you very much, the reason was definitely missing :