Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

1517

April 7th, 2016 14:00

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

print

nsradmin> print

                        name: "rd=devname:/dev/rmt9.1";

                     enabled: Yes;

Where I was wrong?

Thank you for your time

2 Intern

 • 

14.3K Posts

April 7th, 2016 15:00

: is missing or did you remove it? Also, pay attention to quotes.

37 Posts

April 8th, 2016 01:00

I removed :. But in fact, device name is correct

37 Posts

April 8th, 2016 01:00

Thank you very much, the reason was definitely missing : 

No Events found!

Top