For more details, please see ourCookie Policy.


Fibre Channel (SAN)

Reply
Occasional Contributor
Posts: 16
Registered: ‎03-16-2017
Accepted Solution

Script for porterrshow stats to email and clear

Hi Folks,

 

I am looking for shell/Perl script where it should mail me the porterr stats and after that it should clear all the stats. Any help is appreciated.

 

I do have the powershell script but am not that impressed with that so trying to use any shell scripts.Any help is much appreciated.

 

Thanks you.

Valued Contributor
Posts: 559
Registered: ‎03-20-2011

Re: Script for porterrshow stats to email and clear

ssh admin@switch "porterrshow; slotatatsclear; statsclear" | mailx yourname@your.domain
Valued Contributor
Posts: 559
Registered: ‎03-20-2011

Re: Script for porterrshow stats to email and clear

You might want to replace ssh with dbclient and/or tune some mailx arguments like "-s subject" but this one should already work.
Occasional Contributor
Posts: 16
Registered: ‎03-16-2017

Re: Script for porterrshow stats to email and clear

Hi Alexey,

 

Thanks for the commands but i am palnning to run daily @11PM and want to automate with interactive sessions with password intake and put it as a corn job that am thinking of.

 

Every day @11PM  it should loging automatically and send me the email before clearning the stats.

 

Thank you very much for your efforts.

 

 

Valued Contributor
Posts: 559
Registered: ‎03-20-2011

Re: Script for porterrshow stats to email and clear

Sure, that's why I said you might want to replace ssh with dbclient.
Occasional Contributor
Posts: 16
Registered: ‎03-16-2017

Re: Script for porterrshow stats to email and clear

Can you please provide me more details how to replace ssh with dbclient. I am new to this so sort of silly questions.
Occasional Contributor
Posts: 16
Registered: ‎03-16-2017

Re: Script for porterrshow stats to email and clear

Thank you. Much appreciated.

Join the Broadcom Community

Get quick and easy access to valuable resources across the Broadcom Community Network.