Looking for a solution to an issue we are having. Our windows print server has occasional problems where it goes crazy and needs a reboot. We are not seeing any common things like high cpu or high memory usage until after it reboots. I am seeing were some processes like spooler and print isolation host are consuming high virtual memory but physical memory is fine. When this happens printers become unavailable and printing is down. I am looking for a way to alert on this condition only thing I can think of right off is would there be a way to monitor a printer share if it was available?
Perhaps WMI can help. If it is happening the next time, try to check if what the state and if it is still shared for example.
There are a few properties mentioned above that might help to find something interesting.
Another idea would be to check the queues of 1 or 2 popular printers. – A monitor could check if more than X jobs than raise error, restart spooler or server, etc.
There are also another couple of interesting scripts here:
Last, did you check the printer-log? Microsoft-Windows-PrintService/Admin
We use the event log for various printing related issues and alert upon them, such as:
Logs all from Source Microsoft-Windows-PrintSpooler
300: Printer %1 was created. No user action is required
301: Printer %1 was deleted, and users will no longer be able to print to this printer. No user action is required.
302: Printer %1 will be deleted. No user action is required.
303: Printer %1 was paused. No user action is required
304: Printer %1 was resumed. No user action is required
306: Settings for printer %1 were changed. No user action is required
320: Printer %1 failed to initialize because none of its ports (%2) could be found. This can occur if the ports were deleted or the port information is invalid.
315: The print spooler failed to share printer %2 with shared resource name %3. Error %1. The printer cannot be used by others on the network.
371: The print spooler failed to unshare printer %2 which is shared as %3. Error %1
Printer driver %1 for %2 %3 was added or updated. Files:- %4. No user action is required.
Printer driver %1 was deleted. No user action is required.
This version of %1 is incompatible with this version of Windows. Please obtain and install a new version of the driver from the manufacturer (if available), or choose an alternate driver that works with this print device.
You could use the powershell managementpack (https://squaredup.com/content/management-packs/free-powershell-management-pack/) and do a:
$printerok = add-printer -connectionname \\server\printer
and if that doesnt give an error (Add-Printer : The specified server does not exist, or the server or printer name is invalid.) you are good to go.
You could even do a get-printer and then a remove-printer do activate the monitor for