12-07-2011 11:01 AM
I am looking for a "cwcli" to export detail device report on CSV on RME 4.3.1 is there any one can give me the command. some reason I couldn't locate the command on manual. thanks in advance
Solved! Go to Solution.
12-07-2011 12:19 PM
something like this
NMSROOt\bin\cwcli invreport -u cmduser -p cmdpasswd -reportname "Detailed Device Report" -device % -file C:\tmp\DDRexport.csv
with cmduser being a valid LMSuser and cmdpasswd is the password of this user
% is used to export the detailed device report (DDR) for all devices
have a look here for command details and options:
12-07-2011 01:22 PM
no I haven't used that before. I dump the output of cwcli locally to a file and transfer that with sftp to the target server. I prefer this method because the cwcli command is independent from any network congestion that could occure. With sftp I can assure that I transfer the complete file.
Also, I do some post-processing of the output of cwcli, e.g the interface speed is not given as 10 or 100 Mbps but something like 9.535107 and 95.35107 Mbps which is not very handy. If you further want to process the csv file, your parser should be able to parse a "CR" or any kind of new-line inside a value field as well as double qutoes inside a value which is sourounded with double quotes. There were some things I had to learn while doing all this with perl....
Depending on what you want to do the XML dump of the DDR could be easier to further process ...
12-07-2011 02:17 PM
for csv, if you have perl knowledge it is feasible if you are experienced it definitely will be easier
If you are not responsible for the CMDB you should provide the XML dump along with the detaild schema information contained in the last link I provided. Now the CMDB team can pull out the data they need to feed the CMDB - sometimes they have a "scripting guy";
To pull the data from a remote server, there is also the serverlet option which can be used to access this data, see the section "cwcli invreport Remote Access" here:
12-07-2011 12:19 PM
something like this
NMSROOt\bin\cwcli invreport -u cmduser -p cmdpasswd -reportname "Detailed Device Report" -device % -file C:\tmp\DDRexport.csv
with cmduser being a valid LMSuser and cmdpasswd is the password of this user
% is used to export the detailed device report (DDR) for all devices
have a look here for command details and options:
12-07-2011 12:35 PM
Thanks Martin, works great..my last question is, I want to run the command from remote server and the out put file to be written on that server instead of CW server. is that possible!? for UT cli I did by using private key without password /usr/bin/ssh user@server1 /opt/CSCOpx/campus/bin/ut -u XXXX -pXXXXX -cli -query page -layout DEVICES > /server2/outPut so the out put written on server 2 -have you used that? I didn't see on the command. thanks.
12-07-2011 01:22 PM
no I haven't used that before. I dump the output of cwcli locally to a file and transfer that with sftp to the target server. I prefer this method because the cwcli command is independent from any network congestion that could occure. With sftp I can assure that I transfer the complete file.
Also, I do some post-processing of the output of cwcli, e.g the interface speed is not given as 10 or 100 Mbps but something like 9.535107 and 95.35107 Mbps which is not very handy. If you further want to process the csv file, your parser should be able to parse a "CR" or any kind of new-line inside a value field as well as double qutoes inside a value which is sourounded with double quotes. There were some things I had to learn while doing all this with perl....
Depending on what you want to do the XML dump of the DDR could be easier to further process ...
12-07-2011 01:46 PM
thanks so much for detail answer. I need this output to create CMDB file which suppose to be on csv. but the point you mentioned like speed result with 9.535.. something like that didn't work for me. let me see other option if I can find. appreciated your help!!
12-07-2011 02:17 PM
for csv, if you have perl knowledge it is feasible if you are experienced it definitely will be easier
If you are not responsible for the CMDB you should provide the XML dump along with the detaild schema information contained in the last link I provided. Now the CMDB team can pull out the data they need to feed the CMDB - sometimes they have a "scripting guy";
To pull the data from a remote server, there is also the serverlet option which can be used to access this data, see the section "cwcli invreport Remote Access" here:
12-07-2011 03:16 PM
I am responsible for CMDB and I am ok with perl . appears to be the CSV can be doable. thank you so much for your time.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide