Sponsored Content
Full Discussion: Problem in CPU usage
Top Forums Programming Problem in CPU usage Post 302139881 by _Spare_Ribs_ on Tuesday 9th of October 2007 06:31:05 PM
Old 10-09-2007
With the information provided I think the best you're going to get are guesses. Might be worth taking a look at a good logging utility like log4c. You have the ability to pass all sorts of objects like arrays and vectors to it and it will display the contents of them giving you an easy overview of if their contents is growing. Adding some lines of debug code at various points in your code is another obvious solution.

You mention CPU usage increasing. Does memory usage also increase too? If so think about implimenting a Memory Printer class that peridocially prints the used/available memory.

Another thought, and one I've come across quite a bit within my own company, is your program talking to some sort of database? Is it performing read and writes to a specific table that is getting bigger and bigger. If you have a thread that is querying a table at a given interval then obviously the more rows in the table you have the poorer the performance of your application will become, well without proper indexing anyway.
 

10 More Discussions You Might Find Interesting

1. Programming

Monitor CPU usage and Memory Usage

how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries through a c program or java program i want to store that data into database so i can show it graphically thanks in advance (2 Replies)
Discussion started by: Gajanad Bihani
2 Replies

2. Shell Programming and Scripting

Getting CPU Usage

For analysis, I need to gather CPU usage from say 1:00 PM to 2:00 PM every 10 seconds on a given day. I heard this can be done with awk, but my UNIX is kind of rusty. (4 Replies)
Discussion started by: WG1
4 Replies

3. Programming

CPU usage and memory usage

Please tell me solaris functions/api for getting following information 1- Function that tells how much memory used by current process 2- Function that tells how much memory used by all running processes 3- Function that tells how much CPU is used by current process 4- Function that tells how... (1 Reply)
Discussion started by: mansoorulhaq
1 Replies

4. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

5. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

6. Solaris

Multi CPU Solaris system shows 100% CPU usage.

Hello Friends, On one of my Solaris 10 box, CPU usage shows 100% using "sar", "vmstat". However, it has 4 CPUs and prstat and glance are not showing enough processes to justify high CPU utilization. ========================================================================= $ prstat -a ... (4 Replies)
Discussion started by: mahive
4 Replies

7. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

8. Programming

CPU usage

Hi all, I'm using python and psutil a library to get system informations like cpu usage (percent) for a given process. My question is if I have the value in % of the cpu usage how I could get the cpu usage in cycle number I mean not in percent? Thanks a lot D. (5 Replies)
Discussion started by: Dedalus
5 Replies

9. AIX

Overall CPU Usage

Hi Guys, I am a newbie on the forum. This is my first post, so first of all I would like to introduce myself. I am a SAS Analyst programmer working for an Health Insurance client. SAS is installed on a 16 CPU AIX Server with partitions running with shared processor. I have couple of... (2 Replies)
Discussion started by: saurabhiim2003
2 Replies

10. AIX

Problem with nmon, actual CPU usage per process

Hi all, I am currently having trouble to get nmon to print me the actual CPU usage for an interval for a process. According to the manual, something like # time nmon -t -C cron -s 5 -c 2 -F outfile real 0m0.98s user 0m0.03s sys 0m0.04s should print out at least the process... (15 Replies)
Discussion started by: zaxxon
15 Replies
netusage(1)						    BSD General Commands Manual 					       netusage(1)

NAME
netusage -- Display traffic usage statistics about the network SYNOPSIS
netusage [--help] netusage commands [arguments ...] DESCRIPTION
The netusage program interfaces with symptomsd to display and manage network traffic usage statistics. As additional feature of this tool allows for looking up an application or process name using a Mach-O UUID or a PID. NETWORK STATISTICS COMMANDS
The following commands are used to provide different representations of network traffic usage statistics collected on the system. --all-traffic [-p] [-r] [-n name] [-s sortorder] [-d importfile] [-e exportfile] [--unitize] [--compact] [--interactive] [--interval seconds] Display a table listing the total ingress and egress network traffic usage for each application or process categorized by interface. A timestamp of when the first network traffic was observed is also shown. By default, only applications will be shown unless the -p flag is provided. -p Show a list that includes the combination of applications and processes. -r Force a database refresh before showing the list. -n name Only show the application or process matching name. -s sortorder Sort the list according the following available sort orders: t Sort by total network usage. (default) c Sort by cellular interface usage. w Sort by wi-fi interface usage. i Sort by wired interface usage. a Sort by awdl interface usage. e Sort by expensive interface usage. -d importfile Show a traffic usage comparison between the current values and the contents of the file at importfile. -e exportfile Save the current traffic usage values into exportfile. --unitize Show the table values in unitized format (eg. KB/MB/GB). --compact When showing a traffic usage comparison, only list the entries whose values have changed. --interactive Show a traffic usage table that periodically refresh and can be viewed interactively. When an update occurs, the usage value for the application or process that generated network traffic will appear emphasized. You can use the following com- mands to interact with the table. q Quit p Toggles the values between showing raw bytes and unitized format s Change the sort order of the columns r Redraw the screen h Show help Arrow Keys Scroll the list --interval seconds Set the periodic refresh interval to the specified number of seconds. The minimum value is 5 seconds, and the default interval is 15 seconds. (Only valid in interactive mode) MANAGEMENT COMMANDS
These commands are used to manage and reset the collected network traffic usage statistics. --reset-entry [-p] [-n name] Reset the network traffic usage statistics stored for a single entry. Use the -n flag (and optionally the -p flag) to specify the name of the entry. --unitize name Specify the name of the application to reset the network usage statistics. -p Specify a process name instead of an application name. --reset-all Reset the network traffic usage statistics for all the stored entries. OTHER COMMANDS
These are optional utility commands that are available to look up applications or processes. --resolve-uuid uuid Resolve the given mach-O uuid into an application identifier. --resolve-pid pid Resolve the given pid into an application identifier. Darwin May 31, 2019 Darwin
All times are GMT -4. The time now is 02:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy