I need to retrieve process information in a C/C++ program. I need at least basic things like CPU% and memory usage, but additional details would be useful as well.
The problem is that I need to use this information in a portable program, that will run on multiple platforms: windows, linux, MAC and possibly Solaris too.
Is there a libra...
Hi All,
I am looking a Tool on How to Find CPU Utilization of a Single Thread within a Process in VC++.
It would be great full if any one could provide me a tool.
Also it could be better if you guys provide how to do programmatically.
Thank you in Advance.
...
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?
...
Hello,
how can I get a list of all processes in C# and then for each process current memory and CPU consumption?
Sample code is highly appreciated.
Thank you!
...
How to get the CPU, RAM and Disk drive usage of the system in C# code?
...
On Solaris 10, and in C, I'd like to regularly query numbers like
The CPU usage for specific LWPs within that OS process.
The memory usage for that OS process.
I already know how to do the latter by opening /proc/pid/psinfo and reading from that (pr_rssize), but is there a way to implement the former?
In the past I have forked off...
recently my server cpu has been going very high
CPU load averages 13.91 (1 min) 11.72 (5 mins) 8.01 (15 mins)
and my website has only had a slight increase in traffic.
after running a top command i saw my mysql was using 160% cpu!
recently i've been optimizing table and i switch to persistant connections, could this be causing mysql...
Hello guys,
I'm studying high-performance coding for websites in PHP, and this idea popped into my mind:
We know that accessing a database uses a significant amount of CPU usage, so we cache such data, saving it to the HDD. But I was wondering, can't it rest in the RAM of the server, so I can access it even more faster?
...
I have a Windows Service in C#. I want a certain thread to perform specific actions, but only when the CPU is idle. Is there a way to do this in C#.
...
Hi folks,
I've created a script to monitor the output of a serial port that receives 3-4 lines of data every half hour - the script runs fine and grabs everything that comes off the port which at the end of the day is what matters...
What bugs me, however, is that the cpu usage seems rather high for a program that's just monitoring a s...
How do you limit the CPU of a while loop?
In this case, the code which is inside the while loop:
Private Sub wait(ByVal time)
Dim sw As New Stopwatch
sw.Start()
Do While sw.ElapsedMilliseconds < time And StillOpen = True
Application.DoEvents()
Loop
sw.Stop()
End Sub
But now, her...
I have an old ASP.NET application. We send out httpWebRequest to a remote REST server and retrieve XML back, most of the time the application works fine. Recently, we got some high CPU usage issue several times a day.
During the high CPU usage time, we monitored those httpWebRequest connections (by checking netstat for the w3wp process)...
Looking for Win32 API functions, C++ or Delphi sample code that tells me the CPU usage (percent and/or total CPU time) of a thread (not the total for a process). I have the thread ID.
I know that Sysinternals Process Explorer can display this information, but I need this information inside my program.
...
Hi, how to get the CPU and memory usage in VB 6 code? Thanks!
...
I have an objective-c application for OS X that compares two sqlite DB's and produces a diff in json format. The db are quite large (10,000 items with many fields). Sometimes this applications runs in about 55 sec(using 95% of the cpu). Sometimes it takes around 8 min (using 12% of the cpu). This is with the same DB's. When it is only us...
(This was meant to be a general hypothetical question, me whining that .NET was a pig and begging for reasons. It was not really meant to be a question about my specific app.)
Currently I am rewriting some old C++ code in C#. We are porting over all legacy applications. I have C++ applications that take MAX 3% CPU. Mostly they use none....
I have around 3 websites residing in a server which is being shared with other teams. I have been notified that there is a huge increase in CPU usage and we need to lower it down. I doubt my websites are causing this.
I have been using SHOW FULL PROCESSLIST in MySQL and 90% of the time shows queries from other databases. But I think ex...
How to use animation and MultiScaleImage control on the same UserControl?
What I have found that if you place a MultiScaleImage and animation on the same UserControl, you always get a high CPU usage. Is that a MultiScaleImage control bug? Here's a sample project. (just a grid, MultiScaleImageControl and a fading rectangle)
Why CPU usage...
I am looking for an OS level API to account for cycles consumed by a specific thread in OSX.
This is similar to this question (and answer) but in OSX.
...
I have a wxPython app which has many worker threads, idle event cycles, and many other such event handling code which can consume CPU, for now when app is not being interacted with consumes about 8-10% CPU.
Question:
Is there a tool which can tell which part/threads of my app is consuming most CPU? If there are no such generic tools, I...