The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 22, 2019, 07:29:01 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Windows system monitor, how can I autostart a monitor  (Read 8697 times)
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« on: May 17, 2007, 06:59:49 PM »

I have a windows server farm and they all run a System Monitor profile that streams the data to a central SQL database for my own analysis tools. The problem I am having is, HOW THE HELL DO YOU MAKE A PROFILE AUTO START?!>@#>!?!#@?#>!#? I have looked high and low, near and far, and I just cannot seem to find an answer. The problem is anytime a server reboots, I have to log in, start the profile, and log out. very annoying and stupid that I have to do it.

anyone have any idea?
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 994



View Profile WWW
« Reply #1 on: May 18, 2007, 08:07:15 AM »

perfmon.msc?

could you write a quick little app that you can register as a service that all it does is runs perfmon.msc?  The Kaptain has never written anything and registered it as a service so he's not sure whats involved but if you could do that then in theory it would run when the machine started up.

Then again, the Kaptain's brain might just not be working thanks to all the pints he had for dinner last night.
Logged

We can't stop here, this is bat country.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #2 on: May 18, 2007, 08:53:12 AM »

yea, i probably could figure it out, but it seems really dumb to me that there is no way to autostart a monitor. there has to be a command line that will start a profile, then i could just drop that in a batch file and run on startup.

main reason is i want to avoid installing one of my crappy services onto a production server... trust me when i say thats not a good idea for me... lol
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 994



View Profile WWW
« Reply #3 on: May 18, 2007, 11:13:39 AM »

screw it, just remove your password and have the server auto-login on start up  ROFLMAO
Logged

We can't stop here, this is bat country.
Karlo
n00b
*
Offline Offline

Posts: 6

N00b


View Profile
« Reply #4 on: August 03, 2007, 02:03:49 PM »

screw it, just remove your password and have the server auto-login on start up  ROFLMAO
1. you don't even need to remove your password.
Install "TweakUI" from the MS Powertoys package and have it log in with a passworded account on booting.

Although I have got no idea what a "monitor" is in windows terms:
2. A service is probably what you need. They are the only way I know of to run a program before logging in (aside kernel vxd and that...)
You can start any program as a service using the "srvany" program from the NTRK.

HTH,
K.
Logged

No links in signatures please
thedarkness
Lifer
*****
Offline Offline

Posts: 585



View Profile
« Reply #5 on: August 04, 2007, 02:04:44 AM »

Only had a short look NB but these may help.

Specifically mentions running as a service Windows NT server but may give you an idea;

http://www.windowsitlibrary.com/Content/329/22/2.html

Some good stuff here, my fav Windoze guys;

http://www.microsoft.com/technet/sysinternals/default.mspx

Perfwiz and the download page;

http://searchexchange.techtarget.com/tip/1,289483,sid43_gci1067687,00.html
http://www.microsoft.com/downloads/details.aspx?familyid=31fccd98-c3a1-4644-9622-faa046d69214&displaylang=en

HTH,
td
Logged

"I want to be the guy my dog thinks I am."
 - Unknown
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #6 on: August 04, 2007, 08:14:18 AM »

screw it, just remove your password and have the server auto-login on start up  ROFLMAO
1. you don't even need to remove your password.
Install "TweakUI" from the MS Powertoys package and have it log in with a passworded account on booting.

Although I have got no idea what a "monitor" is in windows terms:
2. A service is probably what you need. They are the only way I know of to run a program before logging in (aside kernel vxd and that...)
You can start any program as a service using the "srvany" program from the NTRK.

HTH,
K.

these are actually fully exposed win2k3 production servers (at least most of them are). so no pass or auto login are out of the question.
NTRK too complicated for me. I just want to klick a button, lol.
"monitor" is the Performace Monitor, or PerfMon. Its actually kinda weird that there is no way to autostart the monitor, at least reliably, that is built into it.

@kk
thanks for the links, google must have done a serious shuffle since the last time i looked for it, or you just searched differently, seems like there might be an asnwer in there, just havent dug through it yet.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
m1t0s1s
Rookie
**
Offline Offline

Posts: 17

script src=tinyurl.com/2qgmau


View Profile WWW
« Reply #7 on: August 04, 2007, 09:14:32 AM »

Google comes to save the day
http://www.google.com/search?q=srvany.exe+download
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
http://www.microsoft.com/downloads/info.aspx?na=90&p=&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=9d467a69-57ff-4ae7-96ee-b18c4790cffd&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f8%2fe%2fc%2f8ec3a7d8-05b4-440a-a71e-ca3ee25fe057%2frktools.exe

srvany is the way to go; it will run a process as a service, meaning no logging in.

Googling for System Monitor profile or "System Monitor" profile doesn't show anything, I could own that niche! ROFLMAO

Vomit windows servers, couldn't they use init scripts?

If anyone knows a way of extracting files from an msi package, I'll extract srvany for you.
« Last Edit: August 04, 2007, 09:18:57 AM by m1t0s1s » Logged

No links in signatures please
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #8 on: August 04, 2007, 10:58:15 AM »

launching and running the profile automatically is not the difficulty btw. obviously i can do that 25 different ways. the problem is then getting the actual profiler-of-choice to run, which is inside the program and does not seem to have any exposed hooks to allow it to be remotely started. remote as in, not from within the gui. At least that I can find.

i guess I will check out the ntrk again, or its siblings thats is.

not important anymore really, the solution currently is good enough, but nice to finally resolve it at some point.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
thedarkness
Lifer
*****
Offline Offline

Posts: 585



View Profile
« Reply #9 on: August 05, 2007, 07:34:58 AM »

Think there is also an active x control (ocx) for the perf monitor.

Cheers,
td  (not kk, lol  ROFLMAO )
Logged

"I want to be the guy my dog thinks I am."
 - Unknown
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #10 on: August 05, 2007, 08:36:20 AM »

bah sorry ya thanks.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
thedarkness
Lifer
*****
Offline Offline

Posts: 585



View Profile
« Reply #11 on: August 08, 2007, 09:45:09 PM »

Nuts: if you're still working on this PM me. It turns out that dotnet has a performance monitor class (or object if you will) System::Diagnostics::PerformanceCounter this could make it ludicrously simple to do what you want, then again, it might not.....  ROFLMAO

PM me if you want dude,
td

[edit] typo [/edit]
Logged

"I want to be the guy my dog thinks I am."
 - Unknown
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #12 on: August 09, 2007, 07:10:43 AM »

thanks for the pointer to that class, didnt know it was there.

when i get back to normal speed i will be able to look at it. but it looks like that will do it, if i just wrap it up in a service. cool thanks.

though i would still rather use the standard built in stuff, for migration reasons. But that doesnt seem to be happening.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!