Unsolved

This post is more than 5 years old

2 Intern

 • 

2.5K Posts

52098

November 18th, 2006 13:00

A way to analyze CPU or Memory Usage

Many time users have complained about performance problems without being able to provide usage information.  Hijackthis does list the active processes at the beginning of its log file, but not what resources are using by which process.  The task manager provides the data, but as far as I know not in a format that is easily posted.  I suggest the following solution.

 

1. Enter the command "tasklist /v /nh /FO csv > "some file name" 

2. If you have Excel it can be used to analyze the data, otherwise you will have to analyze the data in “some file name” by hand. 

 

To use Excel to analyze the data

1. Open Excel and create a new Spread sheet

2. Import the data from “some file name.”  The data is in comma, not tab delimited format, start input row at the row number of the column headers (typically 2).

3. You can use Excel's sorting capability to determine resource usage.   

P.S. tasklist /s "system"  /v /FO csv > "some local file name" can be used to obtained the same information from a networked PC “system” (assuming their are no permissions problems)

3.3K Posts

November 18th, 2006 17:00

Help me out. When I follow your instructions, I get:
"'tasklist' is not recognized as an internal or external command, operable program or batch file."

What am I doing wrong?

3.3K Posts

November 18th, 2006 18:00

Oh, I'm aware of all that...I have xp home. Will that command work for me? It doesn't from having followed your instructions.

2 Intern

 • 

2.5K Posts

November 18th, 2006 18:00

Tasklist is listed a a valid command in the "Help and Support" from the start menu on my PC Windows XP Pro/SP2.  The full path name is %windir%\system32\tasklist.exe 
 
Here is an example
C:\>tasklist /?
TASKLIST [/S system [/U username [/P [password]]]]
                 [/M [module] | /SVC | /V] [/FI filter] [/FO format] [/NH]
Description:
   This command line tool displays a list of application(s) and
   associated task(s)/process(es) currently running on either a local or
   remote system.
 
Here is another example
C:\>%windir%\system32\tasklist.exe
 
Image Name                   PID Session Name     Session#    Mem Usage
========================= ====== ================ ======== ============
System Idle Process           0 Console                 0         16 K
System                                4 Console                 0         60 K
smss.exe                         744 Console                 0        116 K
csrss.exe                         792 Console                 0      4,184 K
winlogon.exe                   820 Console                 0      3,096 K
services.exe                    864 Console                 0      2,252 K
lsass.exe                         876 Console                 0      1,404 K
svchost.exe                   1036 Console                 0      2,620 K
svchost.exe                   1084 Console                 0      2,804 K
MsMpEng.exe               1148 Console                 0     11,396 K

Message Edited by msgale on 11-18-200604:36 PM

2 Intern

 • 

2.5K Posts

November 18th, 2006 19:00

I do not have access to XP Home, so I can't test on a XP Home PC, bu I would expect it to work on XP Home.  Did you check the path I gave you?  Did you check  Help and Support?  Maybe check with members of ASAP, to see if it works for them?

3.3K Posts

November 18th, 2006 20:00

Quote:
Maybe check with members of ASAP, to see if it works for them?


Well, there's not a chance I'll do that...I confess, I've been putting you on the spot. The "Tasklist" command is valid and useful as you've described...just not with Windows XP Home Edition.

I just wanted to point out to you that if you post some instructions like that, you should be prepared to answer questions such as what I had asked since the forum is read by untold thousands.

The point to remember is, when posting instructions you should distinquish among operating systems. I just didn't want some unassuming casual reader who has XP Home to waste too much time trying to determine why the command you posted doesn't work for him/her...

It happens...you know?

4 Apprentice

 • 

8.8K Posts

November 18th, 2006 20:00

msgale,

I have XP Pro... can you please in a language that I can understand explain to me how to do it.
thanks for your help

zb1

2 Intern

 • 

2.5K Posts

November 18th, 2006 20:00

1.  I have always admired those who can give very exact step by step instructions, for I can not.  I always leave something out.  I give instruction with a broad stroke and assume that the audience have enough knowledge follow through.  As an example, when telling how to tune-up a car engine back in the 1960's, the typical instructions said to gap the spark plugs so many thousands of a inch.  The instructions did not include how to remove a spark plug, except for special cases nor how to use a gauge to measure the gap.

 

2.  I still find it hard to believe the tasklist does not work on XP/Home and am therefore converting a pc to XP/Home to find out what is going on.     

4 Apprentice

 • 

8.8K Posts

November 18th, 2006 21:00



@msgale wrote:

1. I have always admired those who can give very exact step by step instructions, for I can not. I always leave something out. I give instruction with a broad stroke and assume that the audience have enough knowledge follow through. As an example, when telling how to tune-up a car engine back in the 1960's, the typical instructions said to gap the spark plugs so many thousands of a inch. The instructions did not include how to remove a spark plug, except for special cases nor how to use a gauge to measure the gap.

2. I still find it hard to believe the tasklist does not work on XP/Home and am therefore converting a pc to XP/Home to find out what is going on.






Will you explain it to me and all the other XP Pro users?

zb1

2 Intern

 • 

2.5K Posts

November 18th, 2006 21:00

I do find it suprising that using the command line is something that users can not do any longer.

4 Apprentice

 • 

8.8K Posts

November 18th, 2006 21:00

If it's a matter of a command line that's no problem, but what to put in really is confusing me... in reality I am very left brained.... a true left hander :)

zb1

2 Intern

 • 

2.5K Posts

November 18th, 2006 21:00

OK, I will try.  I have no viable to include screen shots.  I will take awhile late tonight or early tomorrow).  How to use Excel is beyond my abilities.

3.3K Posts

November 18th, 2006 22:00

Quote:
I still find it hard to believe the tasklist does not work on XP/Home and am therefore converting a pc to XP/Home to find out what is going on.

You won't find out what's going on...and there's no need to go through all that...Microsoft just did not include that command as a part of the Windows XP Home Edition thats all. Read here if you want.
.


When Windows appeared on the horizon, the old DOS along with all those commands went out the "Window" (pardon the pun...always wanted to say that).

What remains is really a small (very small) part of what was once the old DOS "commands".

And by the way, since we're on the subject, to clear up a common misconception on the web...windows is NOT a DOS system. The two terms are mutually exclusive. Windows is one operating system, and DOS (Disk Operated System) is quite another. It wasn't built on top of DOS, it just happens to contain a small section that utilizes some of the old DOS commands...now called "Run" commands.

2 Intern

 • 

2.5K Posts

November 18th, 2006 23:00

The command is     tasklist /v /fo csv > "some file"
/v means verbose output
/fo is the output format  and csv means comma separate variables. 
>not the redirect, and existing file with that name in that or current .path will be overwritten
 
I wish to asure erveryone that I understand the differences between 32 Windows and DOS.  Contrary to some opinions the command list not dead, it is now and has always been part of the operating systems command processor.  It is also a way to do many things quickly and efficiently.  In fact Microsoft just released a new  command processor/shell.  It is call the Windows PowerShell version 1.0 and it is available as a free download from Microsoft.  

4 Apprentice

 • 

8.8K Posts

November 19th, 2006 00:00

all that happened is my command prompt flashed and disappeared?

2 Intern

 • 

2.5K Posts

November 19th, 2006 01:00

Commands are in red
Comments are in blue
System is in black
Output from my Windows XP Pro/SP2 Workstation
C:\Documents and Settings\Administrator\My Documents\My Prose>tasklist /v /fo csv
"Image Name","PID","Session Name","Session#","Mem Usage","Status","User Name","CPU Time","Window Title"
"System Idle Process","0","Console","0","16 K","Running","NT AUTHORITY\SYSTEM","82:56:59","N/A"
"System","4","Console","0","68 K","Running","NT AUTHORITY\SYSTEM","0:17:49","N/A"
"smss.exe","744","Console","0","116 K","Running","NT AUTHORITY\SYSTEM","0:00:00","N/A"
"csrss.exe","792","Console","0","4,080 K","Running","NT AUTHORITY\SYSTEM","0:04:22","N/A"
"winlogon.exe","820","Console","0","4,408 K","Running","NT AUTHORITY\SYSTEM","0:00:14","N/A"
"services.exe","864","Console","0","2,272 K","Running","NT AUTHORITY\SYSTEM","0:00:44","N/A"
 
Output from my Windows XP Pro/SP2 Laptop
C:\Documents and Settings\Administrator>tasklist /v /fo csv
"Image Name","PID","Session Name","Session#","Mem Usage","Status","User Name","CPU Time","Window Title"
"System Idle Process","0","RDP-Tcp#1","0","16 K","Running","NT AUTHORITY\SYSTEM","1:01:42","N/A"
"System","4","RDP-Tcp#1","0","232 K","Running","NT AUTHORITY\SYSTEM","0:00:20","N/A"
"smss.exe","580","RDP-Tcp#1","0","376 K","Running","NT AUTHORITY\SYSTEM","0:00:01","N/A"
"csrss.exe","644","RDP-Tcp#1","0","3,444 K","Running","NT AUTHORITY\SYSTEM","0:00:08","N/A"
"winlogon.exe","668","RDP-Tcp#1","0","5,960 K","Running","NT AUTHORITY\SYSTEM","0:00:14","N/A"
"services.exe","720","RDP-Tcp#1","0","4,120 K","Running","NT AUTHORITY\SYSTEM","0:00:05","N/A"
 
Output from my Windows 2003 Enterprise Server
C:\WINDOWS\system32>tasklist /v /fo csv
"Image Name","PID","Session Name","Session#","Mem Usage","Status","User Name","CPU Time","Window Title"
"System Idle Process","0","Console","0","16 K","Unknown","NT AUTHORITY\SYSTEM","218:04:11","N/A"
"System","4","Console","0","240 K","Unknown","NT AUTHORITY\SYSTEM","0:09:46","N/A"
"smss.exe","500","Console","0","448 K","Unknown","NT AUTHORITY\SYSTEM","0:00:00","N/A"
"csrss.exe","612","Console","0","5,120 K","Unknown","NT AUTHORITY\SYSTEM","0:00:18","N/A"

No Events found!

Top