|
IP Accounting (ip_account) |
Top Previous Next |
|
The IP accounting program will collect IP Accounting data from a list of Cisco routers and write the results to files. The script will cycle through each router issuing the “show ip accounting” command. A separate data file will be created for each router and the data in the file can be sorted by Packet Count, Byte Count, Source IP Address, or Destination IP Address. Note, “ip accounting” must be enabled on a router interface in order for data to be available. Please check the appropriate Cisco documentation for more on Cisco’s IP accounting fearture.
Program Name: ip_account
After the script runs, the IP accounting data will be either be in the user’s “net-scripts” directory or a sub-directory under the user’s “net-scripts” directory if the –dir option is specified. It is recommended to use the –dir option so your “net-scripts” directory will not be “cluttered” with excessive data files.
If you plan on clearing the counters for the IP accounting data, you will most likely need to set the User Access level to 2 with the –ual 2 option. Unless, your using Cisco’s AAA and the particular username has privilege to issue that command.
Sample Command: The following command will run the ip_account program and save the data files, sorted by byte count (-sort option), into the directory my_company_070103 (-dir option). The script will also being running in 2nd level privileged mode (-ual 2) and will clear the IP accounting counters (-clc) after collecting the data. If there are any errors while issuing the “clear ip accounting” command, the script will immediately abort because of the –ssafe option. The script will not prompt the user for passwords because the passwords are being read in from the logins.txt file (-pw option).
ip_account -pw logins.txt –sort b –dir my_company_070103 –ual 2 –clc -ssafe
|