Search the Community
Showing results for tags 'terminal server'.
-
I have a Terminal Server running a company app. Every now and then one of the instances of the app crashes but keeps running. When this happens the roque program will hog the CPU and other users will start to complain about the server being slow (especially when doing big queries). In the past I have tried several ways to "kill" the roque program, like taskmanager, using taskkill, using PsKill, using other 3rd party program killers, but to no avail. The only way to get rid of the roque program is to restart the server, however because the server is use almost 24/7, I do not want to restart it every day. At the moment, when we determine a roque program, a tasksheduler is turned on to reboot the server after the nightshift, but about 30 minutes before the morning shift starts. One way to determine a program has gone roque, is to check out the "CPU Time" on the WIndows Task Manager. This is the total time a program/process has used the CPU. For most programs this only a few minutes, but definetely less than 1 hour during 24 hours. I would like to find out the CPU (used) Time of all running programs (processes), to determine if there are programs which have used more then 1 hour CPU Time. Whenever I could programatically determine a roque program in progress, I want to shedule a morning restart of the server. My main problem is, I have not find a way to determine the "CPU Time" (see screenshot). I have search the forum, tries several scripts and snippets to no avail. So any help to determine this "CPU Time" for the running processes would be much appreciated!
- 7 replies
-
- cpu time
- task manager
-
(and 1 more)
Tagged with:
-
I hoping some of you young people can help an old man get off the nickel... I have a small project I'd like to complete before I retire. My problem is that on a terminal server environment I need to be able to detect the PID of a process by 'process name' AND 'process owner' so I can kill that specific process and not affect others who may be running the same process in another session. I can seem to do one or the other but not both. Can anyone please point me in the right direction? Thanks very much in advance. -Glen
-
Hi, I would like to automate Putty commands whereby it will select my saved telnet session (so open Putty Configuration and select session) and afterwards it will open the Putty-prompt and will do next commands: <Enter> ACCESS <Enter> 'UserName' <Enter> SET Priv <Enter> 'Password' <Enter> LOG PORT ALL <Enter> And close Putty Kind of new in AutoIT so all help is welcome ! Thanks in advance, Regards,
-
This Function gets the Hostname of the Client on the Terminal Server, can be used to determine the correct std printer near the location of the client while working on the terminal server session. Func _GetWTSClientName($sid) Local $result = DllCall("Wtsapi32.dll", "int", "WTSQuerySessionInformation", "Ptr", 0, "int", $sid, "int", 10, "ptr*", 0, "dword*", 0) If @error Or $result[0] = 0 Then Return SetError(1, 0, "") Local $ip = DllStructGetData(DllStructCreate("byte[" & $result[5] & "]", $result[4]), 1) DllCall("Wtsapi32.dll", "int", "WTSFreeMemory", "ptr", $result[4]) Return StringReplace(BinaryToString($ip), Chr(0), "") EndFunc ;==>_GetWTSClientName Best regards, J
- 8 replies
-
- ts
- terminal server
-
(and 2 more)
Tagged with: