By education I'm a Computer Scientist but my traning/trade I'm a Network/Systems administrator for a small IT Company. Perhaps a better description would be I'm the PFY to my bosses BOFH ( see here for a description of BOFH and PFY ). And being those things, I'm both a Ba**ard and incredibly lazy. One of the things we have to do on a semi-regularly basis, is to create inventories of our computers and of the software installed on them. When I first started working here as an intern, I had to do this by hand, mainly because I was new and wasn't trusted enough to write a perl script to do the work for me while I head to the Crystal City Underground for a pint. Now that I've moved from intern to Admin and earned the trust of my superior BOFH, I can do just about whatever I want and I'm told, "If you break it, we'll fix, just make sure you learn from it!" As it stands the IT department here is only the BOFH and myself and since I'm the PFY I end up doing the inventory. The last time I did it, I whipped up some Win32 perl to do it, but I still had to go to each computer. I was designing it to go out, walk our network, and remotely pull the information I needed from all the computers but I ran into snags. The biggest one being that it wasn't guaranteed that every computer would be on and connected to the network at the given time the script would be running.

I put the idea on the back burner and went about my work. I discovered the Win32::Daemon module while coding a script to watch the user shares, and an idea came to me. Let the script run as Daemon ( or Service in the Win32 world ) and every time the computer boots, it runs the script I'd already written for inventory, and writes the results to file ( named by its Network Node ID ) on a disk share. Anytime I needed the inventory, it'd be right there, on my network, waiting for me. Yet, again, I still run into snags...
I'd like to know if anyone has any ideas on any of the above entanglements, as well as if you forsee any other problems. If you have any comments or ideas about this, I'd love to hear them. As well if you'd like to send me some pie, I can provide an address...
Macphisto the I.T. Ninja

Everyone has their daemons....

In reply to Laziness and the Win32::Daemon by Macphisto

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.