OCTOBER 26TH, 2011
By ROSS
Recently I have found a few machines having issues with their backup software. From the logs the NTFS journal was missing.
Quick fix is to run this command substituting in your own drive letter.
fsutil usn createjournal m=2147483648 a=536870912 F:
For anyone looking to work with SBS 2008 in a dev environment but unable to provision VM’s with 4gb of ram you may be interested in this little reg key..
I see lots of posts around the net asking for ways to bypass the memory requirements but not many with answers. I stumbled upon this one recently which has finally allowed me to get some SBS 2008 dev work done.
When installing SBS 2008 once you are past the initial install and are up to the first page of the configuration if you hit shift+F10 to bring up a command prompt then launch regedit you can edit the following key to allow the install to continue even though your machine doesn’t meet the requirements.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SmallBusinessServer\Setup]
“SkipReq”=”RamRequirement”
This may also be useful for those of you running on the bare minimum but with an onboard videocard which is consuming some of the ram pushing your usable ram down.
Hope this helps a few people
FEBRUARY 24TH, 2010
By ROSS
I’ve just released a WMI/PHP library which will allow you to easily WMI query Windows machines from your Linux server via PHP. It is somewhat of an extension of the CactiWMI project as it used that code base as a reference for the query and processing of the returned data. Whilst there are a number of libraries in existence for this purpose on Windows there appeared to be none for when running PHP on Linux.
So why has this all come about. In my job I’ve been working on a small helpdesk type application written in PHP. The idea being that it presents all the information about the user, computer and helpdesk ticket that we are working on in one place. It also provides a quicker interface for searching information than the existing systems on their own. For this I needed to be able to hook into Active Directory, the MSSQL job tracking DB and of course WMI data for the remote PC. All this from the Linux based server.
So I branched off some code from the CactiWMI project and initially wrote it as a simple wmi() type function to run basic queries against remote machines. This quickly became a bit of a pain as I needed to add more arguments to allow filters and then more code to decide if a filter had been supplied or not etc so dumped it and rewrote it into a WMI object.
Now what we have is a reasonably simple library which you can include into your project, create the WMI object and throw some queries at hosts. The data returned at the moment is a little rough as its just a numerically indexed multi dimensional array but should make iteration very easy. I’ll be looking for suggestions as to what I can improve as it’s the first library like this I have had to write and I’ve probably made plenty of rookie mistakes.
I’ve attached a copy of the current stable release and an example file which should get people started until I can add some documentation. I may look at releasing the helpdesk app as well as it’s come in quite useful
SVN Repository is located here http://svn.parkingdenied.com/PHPWMILib/
PHPWMILib-0.0.2.r4.tar.gz (13.3 KiB, 1,061 hits)
example.zip (569 bytes, 1,019 hits)
I posted this on the forums some time ago and realised I had not posted here. This is the latest version, the mini change log is below.
- Update templates to suit new input method
- Backwards compatibility for old argument input method
- Overhaul how arguments are passed to wmi.php
- Debug mode via console option
- Add support for alternate namespaces
- Use isset() instead of is not null
- Prevent passwords from showing up in process list
- Fix data template MIN & MAX
- Enterprise Vault Templates
I have added support for additional namespaces and overhauled how input arguments are passed to support this. As you can see below the cmd line help details how input is now passed.
Usage:
-h <hostname> Hostname of the server to query.
-u <credential path> Path to the credential file. See format below.
-n <namespace> What namespace to use. (optional, defaults to root\CIMV2)
-w <wmi class> WMI Class to be used.
-c <columns> What columns to select. (optional, defaults to *)
-k <filter key> What key to filter on. (optional, default is no filter)
-v <filter value> What value for the key. (required, only when using filter key)
-d <debug level> Debug level. (optional, default is none, levels are 1 & 2)
All special characters and spaces must be escaped or enclosed in single quotes!
Example: wmi.php -h 10.0.0.1 -u /etc/wmi.pw -w Win32_ComputerSystem -c PrimaryOwnerName,NumberOfProcessors -n ‘root\CIMV2′
Password file format: Plain text file with the following 3 lines replaced with your details.
username=<your username>
password=<your password>
domain=<your domain> (can be WORKGROUP if not using a domain)
In addition to this there is now no longer any need for additional PHP files. The passwords are stored in a separate file and called via passing the path. This prevents passwords showing up in your process list and allows you to secure it further by limiting access to the password file to the cacti user.
To ease the upgrade process backwards compatibility has been maintained however there is one gotcha. You will still need to update your templates to point to the new password file instead of the reference to the key pair in wmi-logins.php. Aside from this the old templates will all work.
So basically this version is a bit cleaner, adds a few key features, improves security and lays the foundation for further feature upgrades. As per usual the download is attached to this post and any fault tickets can be lodged on my Mantis bug tracker page (Link) and the subversion repository in the usual spot (Link).
CactiWMI-0.0.6.r101.tar.gz (132.1 KiB, 2,802 hits)
FEBRUARY 23RD, 2009
By ROSS
It’s been a while since I released an update and there have been a number of templates since 0.0.4 so packaged them up ready for consumption
Below are some examples of what we now have!
So we have some standard Windows stats such as system calls, context switches and process/processor stats.




We can now also monitor processes themselves on an individual basis.


And some new Exchange graphs including the much requested SMTP graphs.



And here is the download. Any questions or suggestions let me know and feel free to stop by the thread on the Cacti forums (Link!).
CactiWMI-0.0.5.r50.tar.gz (53.7 KiB, 1,019 hits)