Registered member login:
Register Now
Altirigos » Notification Server and Solutions » Notification Server » Collection of last reboot?

» Current Poll
Do you leave the Aclient enabled?
YES - 83.33%
105 Votes
NO - 16.67%
21 Votes
Total Votes: 126
You may not vote on this poll.
» Stats
Members: 9,474
Threads: 11,740
Posts: 55,245
Top Poster: Nick (4,981)
Welcome our newest member, aow
» Online Users: 71
3 members and 68 guests
havardma, jcaputo69, Peterb
Most users online at once 294, 06-30-2007 at 12:24 PM.
» March 2010
S M T W T F S
28 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 123
Reply
Old 02-05-2009, 03:06 PM   #76 (permalink)
 
kschroeder's Avatar
 
Status: Symantec Trusted Advisor
Join Date: 03-08-2005
Location: St. Louis, Missouri, USA
Age: 33
Posts: 420


tnyitray,
I added the sections in Red below to update and add the Primary user.
Code:
 
SELECT T0._ResourceGuid, 
T1.[Name], vc.[User] AS [Primary User], vc.Domain,
T0.[Last Reboot]
FROM (SELECT _ResourceGuid, 
CASE 
WHEN LastBootUpTime = '' THEN NULL 
WHEN SUBSTRING(LastBootUpTime, 11, 1) = 'T' THEN CONVERT(Datetime, 
LastBootUpTime, 126) 
ELSE CONVERT(Datetime, SUBSTRING(LastBootUpTime, 1, 4) + '-' + SUBSTRING(LastBootUpTime, 5, 2) 
+ '-' + SUBSTRING(LastBootUpTime, 7, 2) + 'T' + SUBSTRING(LastBootUpTime, 9, 2) + ':' + SUBSTRING(LastBootUpTime, 11, 2) 
+ ':' + SUBSTRING(LastBootupTime, 13, 2), 126) 
END AS 'Last Reboot'
FROM [Inv_AeX_Reboot]) T0 
INNER JOIN [Inv_AeX_AC_Identification] T1 ON T1.[_ResourceGuid] = T0.[_ResourceGuid]
LEFT JOIN vComputer vc
ON T0.[_ResourceGuid] = vc.Guid
WHERE DateDiff(day, T0.[Last Reboot], getdate()) > 1
ORDER BY T0.[Last Reboot] ASC
__________________
Kyle Schroeder
Symantec Trusted Advisor (TA)
(Yeah, at the other site)
kschroeder is offline   Reply With Quote
Old 02-05-2009, 03:07 PM   #77 (permalink)
 
tnyitray's Avatar
 
Status: Altiris Admin
Join Date: 10-26-2005
Location: Ohio
Age: 40
Posts: 93


Thx I will try it out.

Nice to see your still around.

thx again...
tnyitray is offline   Reply With Quote
Old 02-05-2009, 03:44 PM   #78 (permalink)
 
tnyitray's Avatar
 
Status: Altiris Admin
Join Date: 10-26-2005
Location: Ohio
Age: 40
Posts: 93


If you have time need one more item:

.[Default Gateway]

which I believe comes from Inv_AeX_AC_TCPIP.

BTW the Primary User and Domain work great.
tnyitray is offline   Reply With Quote
Old 02-08-2009, 12:16 PM   #79 (permalink)
 
Status: Altiris Engineer (Super Mod)
Join Date: 08-26-2005
Location: Germany
Posts: 28


Wink

If you look at how vComputer is created, you should be able to use its PU SQL within your report.
AltirisAE is offline   Reply With Quote
Old 04-21-2009, 10:52 AM   #80 (permalink)
 
Status: Super Altiris Admin
Join Date: 02-20-2005
Location: , ,
Posts: 244


Question

Sorry, Where can I find Custom Inventory Configuration utility, please


Thanx
SAMI
SAMI is offline   Reply With Quote
Old 04-23-2009, 02:24 AM   #81 (permalink)
 
Status: Altiris Engineer (Super Mod)
Join Date: 08-26-2005
Location: Germany
Posts: 28


Wink CustInv builder

Hello SAMI, I have attached the builder for your convenience.
Attached Files
File Type: zip aexinvbuilder.zip (19.5 KB, 30 views)
AltirisAE is offline   Reply With Quote
Old 04-25-2009, 01:14 AM   #82 (permalink)
 
Status: Super Altiris Admin
Join Date: 02-20-2005
Location: , ,
Posts: 244


Really I appreciate your reply & that's very kind of you,


SAMI
SAMI is offline   Reply With Quote
Old 05-27-2009, 11:25 AM   #83 (permalink)
 
JeffreyJRiggs's Avatar
 
Status: Super Altiris Admin
Join Date: 02-22-2006
Location: Williamstown, NJ
Age: 37
Posts: 503


Quote:
Originally Posted by Nick View Post
Ok,

Lets just do it this way.

I have attached a zip file that has all the necessary files for the custom inventory and report.

LastReboot archive should contain the following files.
AeXInvSolnAdm4.ini
Last Reboot Report.xml
LastReboot.xml
Creating Reboot Custom Inventory.doc

Copy AeXInvSolnAdm4.ini to the:
\\servername\NSCap\Bin\Win32\X86\Inventory Solution directory.
Import the Last Reboot Report.xml for a ready made report using this custom inventory data.
Copy LastReboot.xml to the \\servername\NSCap\Bin\Win32\X86\Inventory Solution directory.

Create a custom inventory task to use the:
AeXInvSolnAdm4.ini
LastReboot.xml

This custom inventory will create the Inv_AeX_Reboot table in your database.


Soooo this is the current way still?
Im going to give it a try... would like to figure this out...

Thanks
Jeff
__________________
SQL Fundamentals 101:
SELECT * FROM dbo.User WHERE Clue > '0'
Query batch completed, 0 rows
JeffreyJRiggs is offline   Reply With Quote
Old 05-27-2009, 01:13 PM   #84 (permalink)
 
JeffreyJRiggs's Avatar
 
Status: Super Altiris Admin
Join Date: 02-22-2006
Location: Williamstown, NJ
Age: 37
Posts: 503


Quote:
Originally Posted by Mike View Post
Sure, I don't mind paying a few bucks for good info.

What I'm looking to do is take the custom inventory data that's being pulled from WMI of last bootup time and run a datediff against it.

This would be just like the previous exampls of:
Code:
SELECT T0._ResourceGuid,
T1.[Name],
CASE
WHEN LastBootUpTime=' '
THEN NULL
WHEN SUBSTRING (LastBootUpTime,11,1) = 'T'
THEN CONVERT (Datetime, LastBootUpTime, 126)
ELSE CONVERT(Datetime, SUBSTRING(LastBootUpTime,1,4) + '-' + SUBSTRING(LastBootUpTime,5,2) + '-' +
SUBSTRING(LastBootUpTime,7,2) + 'T' + SUBSTRING(LastBootUpTime,9,2) + ':' + SUBSTRING(LastBootUpTime,11,2) + ':' +
SUBSTRING(LastBootupTime,13,2), 126)
END AS 'Last Reboot'
FROM [Inv_AeX_Reboot] T0
INNER JOIN [Inv_AeX_AC_Identification] T1 ON T1.[_ResourceGuid] = T0.[_ResourceGuid]
plus a condition that says something like
Code:
where datediff(dd,lastbootuptime,getdate()) > 30
but it won't work as simple as this because the datediff sees the lastbootuptime as a character value instead of a datetime value, so the CONVERT used above isn't carrying over to the condition.

Thanks for the swift response,

Mike


so this works for me except... i would like to add a column for how many days it has been up...
how do you do that????

help greatly appreciated...
__________________
SQL Fundamentals 101:
SELECT * FROM dbo.User WHERE Clue > '0'
Query batch completed, 0 rows
JeffreyJRiggs is offline   Reply With Quote
Old 05-27-2009, 01:46 PM   #85 (permalink)
 
JeffreyJRiggs's Avatar
 
Status: Super Altiris Admin
Join Date: 02-22-2006
Location: Williamstown, NJ
Age: 37
Posts: 503


ok so the inventory wasnt importing...

in the lastreboot.ini I had to add the entire path to the nsi... why would that be?
the nsi was getting dropped into the cache directory but the aexcustinv was trying to pull from \express\inventories???

so my ini looks like this..
aexcustinv.exe /in .\LastReboot.xml /o .\ /out "C:\Program Files\Altiris\eXpress\Inventory\LastReboot.nsi"
aexnsinvcollector.exe /hidden /nsctransport /v default /useguid
__________________
SQL Fundamentals 101:
SELECT * FROM dbo.User WHERE Clue > '0'
Query batch completed, 0 rows
JeffreyJRiggs is offline   Reply With Quote
Old 05-27-2009, 02:56 PM   #86 (permalink)
 
JeffreyJRiggs's Avatar
 
Status: Super Altiris Admin
Join Date: 02-22-2006
Location: Williamstown, NJ
Age: 37
Posts: 503


Quote:
Originally Posted by JeffreyJRiggs View Post
so this works for me except... i would like to add a column for how many days it has been up...
how do you do that????

help greatly appreciated...

ok this works... nicely too.. thanks to our local SQL guru...

SELECT T1.[Name],
CASE
WHEN LastBootUpTime=' '
THEN NULL
WHEN SUBSTRING (LastBootUpTime,11,1) = 'T'
THEN CONVERT (Datetime, LastBootUpTime, 126)
ELSE CONVERT(Datetime, SUBSTRING(LastBootUpTime,1,4) + '-' + SUBSTRING(LastBootUpTime,5,2) + '-' +
SUBSTRING(LastBootUpTime,7,2) + 'T' + SUBSTRING(LastBootUpTime,9,2) + ':' + SUBSTRING(LastBootUpTime,11,2) + ':' +
SUBSTRING(LastBootupTime,13,2), 126)
END AS 'Last Reboot',
datediff(day,
Convert(DateTime,
(
CASE
WHEN
LastBootUpTime=' '
THEN
'1/1/1900'
WHEN
SUBSTRING (LastBootUpTime,11,1) = 'T'
THEN
CONVERT (Datetime, LastBootUpTime, 126)
ELSE
CONVERT(Datetime, SUBSTRING(LastBootUpTime,1,4) + '-' + SUBSTRING(LastBootUpTime,5,2) + '-' + SUBSTRING(LastBootUpTime,7,2) + 'T' + SUBSTRING(LastBootUpTime,9,2) + ':' + SUBSTRING(LastBootUpTime,11,2) + ':' + SUBSTRING(LastBootupTime,13,2), 126)
END )),
GETDATE())
AS 'DAYSUP'
FROM [Inv_AeX_Reboot] T0
INNER JOIN [Inv_AeX_AC_Identification] T1 ON T1.[_ResourceGuid] = T0.[_ResourceGuid]
order by LastBootUpTime ASC
__________________
SQL Fundamentals 101:
SELECT * FROM dbo.User WHERE Clue > '0'
Query batch completed, 0 rows
JeffreyJRiggs is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -4. The time now is 09:54 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
vB.Sponsors
Altirigos