|
I want to get the CPU and memory usage of a single process on Linux - I know the PID. Hopefully, I can get it every second and write it to a CSV using the 'watch' command. What command can I use to get this info from the Linux command-line?
Started by Supertux on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
To get the memory usage of just your.
Ps -p <pid> -o %cpu,%mem,cmd
(You can leave off "cmd" but that might be helpful in debugging).
Or also use the -p flag and specify the pid without using grep .
|
|
I know how to get CPU usage and memory usage for a process, but I was wondering how to get it on a per-thread level. If the best solution is to do some P-Invoking, then that's fine too.
Example of what I need:
Thread myThread = Thread.CurrentThread; /...
Started by Timothy Khouri on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Processescpuusage.aspx
You can't get memory usage per thread because memory is shared between all threads in a process as a whole, but CPU use:
Process p = Process.GetCurrentProcess; foreach (ProcessThread pt in p.Threads.
|
|
Can anyone recommend a way in which I can throttle an application based on the current disk usage or even CPU usage.
The application I am writing scans files on the hard disk and will be pretty hard disk intensive in itself. Can anyone recommend a way...
Started by Sammy on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Take a look at this ( "How can I programmatically limit my program’s CPU usage to below 70.
|
Ask your Facebook Friends
|
I would like to limit the resource usage on a per user basis on a Windows Server 2003, 2008, or 2008 R2 machine. Suppose I have four users logged into one machine using TS and they are all using various resources. How do I make sure that each user gets...
Started by James Brown on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at serverfault):
Http://www.microsoft.com/windowsserver2003/technologies/management.
Control CPU and memory usage.
|
|
My machine's CPU usage is low (<10%), as judged from Process Explorer and Task Manager, but the CPU, or HDD Light ( the light just below the power button, at the front of CPU, I am not sure whether it is HDD or whatever ) is blinking all the time, ...
Started by Ngu Soon Hui on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at superuser):
So it....
The LED on the front of your computer is for the harddrive, not the CPUBy "CPU Light", do you mean the hardware LED on the computer? This LED indicates hard-drive activity, not CPU activity.
Thus the low CPU usage.
|
|
I have created a VM image out of a physical PC running Windows XP. I am now trying to run that image as a guest OS under Ubuntu Linux using VirtualBox. Everything seems to be running smoothly with the exception of one issue:
The performance of the guest...
Started by ToiletOverflow on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at serverfault):
If the guest is using TSC for calibration and the host CPU does not have synchronized changes CPU frequency....
"Pentium (D) CPU 2.80Ghz" is the processor name passed by the hypervisor (via cpuid), "3.95Ghz by the virtualization...
|
|
How do I get the cpu usage percentage to display in the label on a form?
Started by Mark on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Http://www.aspfree.com/c/a/VB.NET/WMI-Programming-with-Visual-BasicNET-What-is-the-WQL....
Look here: How to get the CPU Usage C#
Should be easy to translate to VB.Net
You can do it in .NET such as CPU usage, hardare specs, etc.
|
|
Hi, how to get the CPU and memory usage in VB 6 code? Thanks!
Started by oliverikawood on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Http://www.eggheadcafe.com/community/aspnet/8/44059/cpu-usage.aspx
Determine the CPU Usage_USE = "KERNEL\CPUUsage"
Code
Public Function CPU_Usage_Percent() As Long On Error GoTo errorhandler(hKey, CPU_USE, 0....
|
|
Is there a way to get the CPU and memory usage programatically (C++) of an application on HPUX?
Started by lk on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
How to determine CPU and memory consumption from inside a process
Answers are given for Windows.
|
|
I need to check CPU and memory usage for the server in java, anyone know how it could be done?
Started by Johnny Bou on
, 13 posts
by 13 people.
Answer Snippets (Read the full thread at stackoverflow):
For CPU consumption you'll have() - Runtime.getRuntime().freeMemory();
For CPU usage, you'll need to use an external application to measure() - Runtime.getRuntime....
Java's Runtime object can report the JVM's memory usage.
Areas.
|