What's the command to export the RME DB to a .csv file

Unanswered Question
Aug 22nd, 2007
User Badges:

In RME 3.5 you can run RME> Administration> Inventory> Export to File.


What's an equivalent command that can be executed from a CLI?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (4 ratings)
Loading.
Joe Clarke Wed, 08/22/2007 - 10:50
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

There is no equivalent command. cwexport is the closest, but it does not produce CSV output. That is why I wrote DEEsv. This capability is available, however, in LMS 2.5 and higher.

getwithrob Wed, 08/22/2007 - 11:11
User Badges:

Please take a look at the output below. I think the syntax is correct... Let me know. Thanks-

**********************************************


[email protected] > ./cwexport inventory -u cwuserid -p cwpasswd -f /tmp/inventory.xml


* Warning * The -p option is highly insecure and *not* recommended.

* Warning * See online help for securing your password.


Exception caused in the result setcom.sybase.jdbc.SybSQLException: ASA Error -210: User 'DBA' has the row in 'MANAGED_DEV' locked

* Error * Could not create device list

Check if database is up and Running

* Error * You have specified an invalid View/wildcard in the payload file. Else, the View/wildcard contains invalid or unmanaged devices. Exiting.

[email protected] >

Joe Clarke Wed, 08/22/2007 - 11:18
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

What you want is:


cwexport inventory -u cwuserid -p cwpasswd -device % -f /tmp/inventory.xml


However, it looks like you have a database problem, and one of the key tables needed to extract this information is locked by another thread. This may be a transient problem (i.e. running the command again will work), or you may have a stuck lock. In the latter case, you will need to restart dmgtd, then try to run cwexport again.


And to my previous post, I meant that I developed the DevExp tool as a CLI alternative to "Export to file". This provides a list of devices and their credentials.

getwithrob Wed, 08/22/2007 - 11:26
User Badges:

is the syntax below correct?


./cwexport inventory -u cwuserid -p cwpasswd -device % -f /tmp/inventory.xml



getwithrob Wed, 08/22/2007 - 11:31
User Badges:

Will tailing or browsing one of the log files give any hints to what the problem might be?

Joe Clarke Wed, 08/22/2007 - 11:35
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

The previously mentioned problem about the table being locked is usually caused by IcServer or DIServer. You could enable debugging for those, then look at the daemons.log. For DEE-specific problems, look at the DEE.log.

getwithrob Wed, 08/22/2007 - 11:42
User Badges:

How would I turn debugging on for IcServer and DIServer?

Joe Clarke Wed, 08/22/2007 - 11:34
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

Assuming you're running that command from /opt/CSCOpx/bin, then yes, it's correct.

Actions

This Discussion