Programming :: C Program To Get Cpu Utilization?

Feb 26, 2010

language:cOs: ubuntuI have googled for a c program to get cpu utilization factor from 2 days.We can get it through "top", "who" commands..But I hav not found any API or a program.

View 5 Replies


ADVERTISEMENT

Programming :: Capture Network Utilization In System?

Nov 15, 2010

As we know, the data in /proc/net/dev fall into two categories -- the data received and the data transmitted. Now I want to calculate the network utilization, should the calculate be ---- (datareceived + datatransmitted - datareceivedlasttime - data transmitted last time)/ timeinterval?

View 1 Replies View Related

Programming :: Get Process Running CPU Core And The Utilization On That Core?

Apr 27, 2010

Assume someone bind a particular process to a particular CPU core(In multi core machine) by using sched_setaffinity() like functions. Then how we can get that process running core id and CPU core utilisation of that process on that running CPU core(Pragmatically or by a Linux command)?.

View 5 Replies View Related

Programming :: Program A SH - Bash Program With Zenity To Play Radio Based On A Site?

Feb 15, 2011

I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html

My code to get url's radio country.htm is:

Code:

View 2 Replies View Related

Programming :: Open Or Run A File/program Through A C++ Program

Jan 15, 2010

Ok so Basically i have 2 questions

1. i know how to create a file with c++ using but is there a way to save it to a specific location on your computer with windows and linux

Code:

2. i need to know how to run/execute/open a file in a c++ program im using and its not working

Code:

View 4 Replies View Related

Ubuntu :: Get All CPU Utilization Using Top Command?

Dec 21, 2010

what dose this mean top -n 2 -b -d 0.2 i?

how to get all CPU utilization in using top command

View 9 Replies View Related

Red Hat / Fedora :: How To Get Cpu Utilization Of Particular Process

May 6, 2009

How to get cpu utilization of particular process without using top command. I want programmatically C or C++.Top command source is large.I can't analyze where %cpu usage got.

View 1 Replies View Related

Programming :: Build A Simple Program For C Programming Class?

Feb 12, 2011

im trying to build a simple program for my C programming class, this is the source code

#include <stdio.h>
int main()
{
int length, width, length, height, area, perimeter;
perimeter = width + length + height;
area = width * length + heigth;

[Code]...

i dont see any error (you might)but every time i run it it runs but after it asks me to input for the width i do it but it doesn't take me to the length, it just stays blank until i input another value in the same place for the width, it asks me for 4 inputs in total i don;t know why, and after i run it different times it gives me different values for the perimeter and are. how can I fix this?

View 5 Replies View Related

Red Hat / Fedora :: Memory Utilization For Particular Process

Jul 15, 2009

Is there any command to get the memory utilization of a particular process in Linux?I tried with Top and /proc/pid/status commands but the results are not proper, the memory keeps on increasing.Can anyone tell other than Top and /proc/pid/status commands ?

View 2 Replies View Related

SUSE :: Drive Access At 100% Utilization?

Nov 9, 2010

I have a storage array and one of the logical volumes stays at 100% utilization whenever any process accesses the volume. It is a 9TB RAID 5 array on it's own SCSI interface card. I have another 9TB logical volume in the same chassis, on it's own card that does NOT exhibit the same behavior.

I'm measuring the utilization using atop. The strange thing is it pegs out at 100% utilization for the entire time a process accesses the volume, even when the data being accessed is just a few kb. My users home directories reside on this volume so as you can imagine every user is impacted whenever someone accesses any file from this volume.

The only processes being shown in atop are nfsd processes and xfslogd process. Nothing has been deliberately changed on this system. The only thing out of the ordinary that changed is a user deleted several TB from his home directory a week or so ago, just about the same time this problem came up. During the troubleshooting process, tis system has been rebooted several times.

View 3 Replies View Related

CentOS 5 :: High CPU Utilization For All Processes?

Apr 9, 2010

I am getting a strange problem with my new machine (P4 3Ghz, 1 GB RAM DDR333). The machine is an industrial PC. Firstly I had installed Fedora Core 2 on it. It ran superbly without any problem. I tried to load Redhat Enterprise Linux WS4 (Update 2 as well as Update 5) on it. But the PC was giving high CPU utilization for each and every task. With-out any application running both the cores shows utilization around 10 %. But when i try to my application, the CPU utilization in one of the cores goes to 100 % for majority of the time. This is causing my appilcation to run slowly when compared to the same application running on the same machine under fedora core 2. (CPU Utilization around peak 17 % in either of the cores in Fedora Core2) Recently I installed Cent OS 5 on it. But the behavior of the PC remains the same as of Redhat Enterprise Linux WS4. Some-where on the forums I had read about the RAM size. So i tried to downgrade the RAM from 1 GB to 256 MB. But the problem remains the same. I think it has to do with some kernel tweaking.

View 8 Replies View Related

General :: High Memory Utilization By System?

Nov 11, 2009

I have a server running samba process and there are about 70 samba users connected at a time. The system has 4Gb of memory and it seems each samba process is utilizing only 3352Kb of memory.
When I run the command
pmap -d (pid of samba)

It gives as:
b7ffa000 4 rw-s- 0000000000000000 0fd:00003 messages.tdb
bfe46000 1768 rw--- 00000000bfe46000 000:00000 [ stack ]
ffffe000 4 r-x-- 0000000000000000 000:00000 [ anon ]
mapped: 33384K writeable/private: 3352K shared: 20504K

But when I run the top command, it results as below:
Tasks: 163 total, 1 running, 162 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.9% us, 4.9% sy, 0.0% ni, 93.3% id, 0.8% wa, 0.2% hi, 0.0% si
Mem: 3895444k total, 3163192k used, 732252k free, 352344k buffers
Swap: 2097144k total, 208k used, 2096936k free, 2487636k cached

Why could the system be utilizing such high memory? By the way, the server is not running other processes. The samba version running in it is 3.0.33-0.17.

View 1 Replies View Related

Ubuntu Servers :: 10.04 LTS Memory And CPU Utilization Spikes?

Oct 21, 2010

I have a Ubuntu 10.04 LTS and about 40 ThinClients running LSTP in a school's computer lab. Everytime the users start to use applications, the server's memory utilization increases, while the swap memory is quite free. I have 12GB of memory on that server.

View 9 Replies View Related

Ubuntu :: Calculate All Processor Utilization Using Top Command?

Dec 28, 2010

how does calculate all processor utilization in ubuntu using top command?

View 1 Replies View Related

General :: Change Cpu Utilization Of Running Process?

Apr 28, 2011

Can we change cpu utilization if its have very high in running mode without stop that process.

View 1 Replies View Related

Networking :: Internet Utilization Live Report ?

Mar 27, 2010

I want to view live utilization of Internet usage like the wetool in smoothwall. This admin can view www and any other protocol Internet usage by end user

View 1 Replies View Related

Software :: Processor Utilization During Peak Period

Jul 1, 2010

How i can know processor utilization during peak period in rhel 5.3.

View 5 Replies View Related

Ubuntu :: Internet Utilization Monitoring In Lucid AMD64

May 23, 2010

I wanted to know if there anyway we can check -

a. Which are the applications using internet connection currently

b. Which website/url they are connected and how many bits are being downloaded/uploaded currently.

View 2 Replies View Related

Red Hat / Fedora :: Unable To Push RHEL 6.0 Past 95% Utilization

Apr 22, 2011

- I am running with Oracle UEL 6.0 (2.6.32-100.28.5.el6) because stock RHEL 6.0 (2.6.32-71.el6 ) has issues with the async I/O driver.

- The test is a high throughput performance benchmark running on Oracle 11gR1

- I am pumping a lot of disk I/O through the system while running with enough users to max out the 8 CPUs, which get to 99+% utilization with RHEL 5.3

- The server is a 4-socket Nehalem EX X7560. Right now, only 2 cores per socket are enabled.

- There are GBs of memory left over. The disk response time of the SSD arrays is around 1ms and the arrays are capable of 4-5 times more IOPS. Same with networking, etc. The testbed is capable of maxing out 32 CPUs with RHEL 5.3 I cannot push the RHEL 6.0 CPU utilization past 95-96%. The same test on all flavors of RHEL from 4.4 to 5.3 can totally saturate the CPUs. It feels like the system is intentionally holding back some CPU cycles.

View 2 Replies View Related

Ubuntu :: Display Graphs For System Resource Utilization

Feb 3, 2011

I have a SSH access to some linux servers, is it possible that I can get some graphical report for system utilization (CPU, memory and disk space) for a given time range.

I dont have any graphical access to the system.

Currently I am fetching the records using "sar -r" command , pasting them in a excel sheet to generate the reports.

View 3 Replies View Related

Ubuntu Multimedia :: Maverick Compiz Choppy/high Cpu Utilization?

Jul 7, 2011

Been using Maverick on my Dell Studio XPS for many months without issue. About a week or two ago, compiz has been acting funny and using a lot of cpu time, making everything "choppy," especially after resuming from suspend. I've googled and searched the forum, but all the related posts seem to be several years old.I tried selecting the previous kernel but it didn't help. Was there a bad update to compiz or ati graphics?

My info:

Code:
> lspci | grep VGA
21:02:00.0 VGA compatible controller: ATI Technologies Inc Madison [Mobility Radeon HD 5000 Series]
> grep -i driver /etc/X11/xorg.conf | uniq
Option "VendorName" "ATI Proprietary Driver"
Driver "fglrx"

[Code]...

View 3 Replies View Related

CentOS 5 Hardware :: NVidia Driver Xorg High CPU Utilization

Nov 12, 2010

I installed the NVIDIS driver for 64b Linux, and now I face a high cpu utilization (up to 40%) in the XORG when I swith from one application to another. I need the driver because otherwise some web pages are rendered with a something like a watermark

LSPCI
01:00.0 VGA compatible controller: nVidia Corporation G98M [Quadro NVS 160M] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Dell Unknown device 024f
Flags: bus master, fast devsel, latency 0, IRQ 169
Memory at f5000000 (32-bit, non-prefetchable) [size=16M]
Memory at e0000000 (64-bit, prefetchable) [size=256M]
Memory at f2000000 (64-bit, non-prefetchable) [size=32M]
I/O ports at df00 [size=128]
[virtual] Expansion ROM at f4000000 [disabled] [size=128K]
Capabilities: <access denied>

NVidia driver
260.19.21
uname -r
2.6.18-194.26.1.el5

View 3 Replies View Related

Ubuntu :: Cant Provide Testing On Memory, CPU, Hard Disk Utilization And Also Stress Test?

Feb 24, 2010

is there any performance tool for linux? i av found phoronix but it cant provide testing on memory, CPU, hard disk utilization and also stress test.

View 4 Replies View Related

General :: Scsi RAID Jbod And Arrays - Disk Utilization And The Corresponding Low Data Transfer

Jul 6, 2010

So I have a system that is about 6 years old running Redhat 7.2 that is supporting a very old app that cannot be replaced at the moment. The jbod has 7 Raid1 arrays in it, 6 of which are for database storage and another for the OS storage. We've recently run into some bad slowdowns and drive failures causing nearly a week in downtime. Apparently none of the people involved, including the so-called hardware experts could really shed any light on the matter. Out of curiosity I ran iostat one day for a while and saw numbers similar to below:

[Code]...

Some of these kinda weird me out, especially the disk utilization and the corresponding low data transfer. I'm not a disk IO expert so if there are any gurus out there willing to help explain what it is I'm seeing here. As a side note, the system is back up and running it just runs sluggish and neither the database folks nor the hardware guys can make heads or tails of it. Ive sent them the same graphs from iostat but so far no response.

View 1 Replies View Related

General :: Write A Script To Report Useful Information On Disk Utilization For Each User's Home Directory

Feb 27, 2010

I need to write a script to report useful information on disk utilization for each user's home directory.For each directory I need to show: 1. the long listing of that directory entry (but not the files in the directory), so that I can see the rights and owners of the directory.2. The amount of disk used by that directory, in human-readable format, including subdirectories. I need to have two lines for each user one after the other. For example:

/home/user1 directory info
/home/user1 disk usage
/home/user2 directory info
/home/user2 disk usage

The script will assume that all users, except user root, have their home directories in the /home directory (no need to do anything with the /etc/passwd file). And if the administrator adds or removes users, the script should still work correctly (so the script shows the information for all current users).

Here's what I do know. The command "ls -ld /home/user's_name" will give me the info I need for #1. And the command "du -hs" will give me the info I need for #2. What I don't know is how to grab each individual directory in order to apply the above commands to each of them in order. ???

View 14 Replies View Related

Programming :: Gcc And Pow In A C Program?

Feb 5, 2009

I found some interesting behavior when discussing the pow function from Math.h with someone. I am well aware of the need to compile with the -lm flag, but to my surprise this actually isn't necessary if the arguments to the pow function are literals. For example, this program compiles in gcc without using -lm:

Code:

#include <stdio.h>
#include <math.h>
int main()

[code]....

If I try to change the call to any of these:

Code:

double bCubed = pow(2.0, e);

Code:

double bCubed = pow(b, 3.0);

Code:

double bCubed = pow(b, e);

Then the -lm option is required or else it can't compile. So does anyone know why it's necessary to use -lm when the argument(s) is/are variable(s) but it works fine if both arguments are literal values? As a side note, any of the above compile with g++ however. Also, if it helps, this is the version of gcc I'm using:

gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)

This doesn't happen on my Mac however that is running: i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5484)

View 3 Replies View Related

Programming :: Getting TTY Id From A C Program

May 23, 2009

I am new to linux/c programming and I am trying to get TTY id from my c program. Something like this:

int TTYID = get_ttyid();

How do I do that?

View 1 Replies View Related

Programming :: Error In My C++ Program ?

Mar 15, 2011

The following is the error in my program :

Here is my program...

View 7 Replies View Related

Programming :: Autorun Program In C++

Mar 10, 2010

With what functions i can write my program in /etc/init.d with c++ to start every time the computer starts ? (like in windows with RegOpenKey,RegSetValueEx..............) ?

View 4 Replies View Related

Programming :: Chat Program In C

Aug 17, 2010

Am new to this community and this is my first post. am doing a project where i have to develop a wireless ad hoc routing protocol. I have just begun working on the project. I did not know where to start, so started off with a simple chat program using TCP and thought of making the modifications to it later on. But I do have a prob even i running that!

Am not getting the messages in a synchronized manner. The prog is running fine, but the messages that i type from the server are not reaching the client at all, and at times some garbage values are getting printed(When the strcmp()fn returns 1, "connection terminated" gets printed timely in both the sides. this is the oly situation where i do not get garbage values.) am using VC++ 6.0 here.I have been breaking my head for the past 3-4 days for this simple issue. any response to this would be of great help.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved