0

When troubleshooting a host connectivity issue, I log into an HP 5412, for example and look for possible issues on the one port by pulling up the logs. Is there a way to filter/sort the output so that you only see the events for the desired string ("F18" for example)? The way I have worked around this so far is to copy the logs onto a document and then do a find operation to clean up the output and isolate only what I need for my troubleshooting steps/ticket. This can take a bit of time; is there another command or option to append to the log command which would allow to filter results (much like piping the output to grep for a string in bash).

Thanks!

4
  • 1
    You should really have a log server to which your network devices send their log messages. Log servers usually have more powerful tools for doing such things. – Ron Maupin Nov 17 '20 at 23:33
  • Thank you. This may be something I can suggest to the Network Engineering team in my enterprise (I work in the support center for a fairly large corporation). Excluding that possible resolution; do you know of a way to format the log commands output to sort it? – Punko Brewster Nov 17 '20 at 23:38
  • I will let the experts on HP switches answer. Some groups in our company have tried them a few times, but always ended up dumping them after a few years, so I do not have any real direct experience with them. – Ron Maupin Nov 18 '20 at 0:26
  • Procurve or Comware? As I recall, procurve is a definite no. Comware might support "grep". – Ricky Nov 18 '20 at 4:56
1

With most outputs, you can use the common |i scheme, e.g. log | i F18. (i for include, there's also exclude and begin.)

1
  • These are Procurve. Thanks for the answer, tested and it worked! – Punko Brewster Nov 18 '20 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.