At present, I can think of two options:
Use a script to get the performance counter value
eg.
PerformanceCounter upTime = new PerformanceCounter("System", "System Up
Time");
upTime.NextValue();
TimeSpan ts = TimeSpan.FromSeconds(upTime.NextValue());
Console.WriteLine("{0}d {1}h {2}m {3}s", ts.Days, ts.Hours, ts.Minutes,
ts.Seconds);
Or
Use a script run as sched task, which reads 'system uptime' alerts, get the
uptime value from the alert, convert the seconds value to days/ minutes and
display the resultant value in any 'custom field' of scom alert.
On Thu, Nov 21, 2013 at 3:33 PM, Narendra Bathula <[email protected]>wrote:
> Thanks Sriknath that worked.
>
>
>
> One more question on the same alert. I am getting the server uptime in
> second’s like below.
>
>
>
> Counter: System Up Time
> Has a value 17189878
>
>
>
> We need this in days,min’s and seconds instead of seconds.. please suggest
> me on this.
> ------------------------------
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Srikanth Thumma
> *Sent:* Thursday, November 21, 2013 4:20 PM
> *To:* [email protected]
> *Subject:* Re: [msmom] system uptime
>
>
>
> Probably 'Health' is not reset after you manually closed the alert. try
> 'Reset Health'.
>
>
>
> On Thu, Nov 21, 2013 at 3:07 PM, Narendra Bathula <[email protected]>
> wrote:
>
> I have created a monitor using system performance counter "system up time"
> , time interval as 5 mins and configured for 30 days uptime. I got the
> Alerts from the servers.
>
> And have manually closed the alert in the console without restarting the
> server(in the alert). that means server uptime is still more than 30days.
> i have not got any new alert in the console.
>
>
>
> If it checks every 5 min's i should get a new alert. why it is not
> generating...?
>
>
>
> Regards
>
> Naren
>
>
>
>
>
> ::DISCLAIMER::
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only.
> E-mail transmission is not guaranteed to be secure or error-free as
> information could be intercepted, corrupted,
> lost, destroyed, arrive late or incomplete, or may contain viruses in
> transmission. The e mail and its contents
> (with or without referred errors) shall therefore not attach any liability
> on the originator or HCL or its affiliates.
> Views or opinions, if any, presented in this email are solely those of the
> author and may not necessarily reflect the
> views or opinions of HCL or its affiliates. Any form of reproduction,
> dissemination, copying, disclosure, modification,
> distribution and / or publication of this message without the prior
> written consent of authorized representative of
> HCL is strictly prohibited. If you have received this email in error
> please delete it and notify the sender immediately.
> Before opening any email and/or attachments, please check them for viruses
> and other defects.
>
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>
>
>
>
>
>
>