473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Systemdiag via c.prog

Hello NG,

I want to write a c-prg. which examines the current memory-usage and
cpu-usage of the system (win32),
and writes the values to a logfile.

Does anybody know which librarys or functions I should use?

Unfortunately I'm almost new to programming in c :-(

Thanks,

bastian
Nov 14 '05 #1
9 1580
Ba************@aspect-online.de wrote:
Hello NG,

I want to write a c-prg. which examines the current memory-usage and
cpu-usage of the system (win32),
and writes the values to a logfile.

Does anybody know which librarys or functions I should use?

Unfortunately I'm almost new to programming in c :-(

Thanks,

bastian


I think that if you are new to C this is quite difficult to achive. You
need a very good knowledge of the WIN32 API, and of the C language to
write this kind of stuff.

I would start by studying the SDK. Specifically look for the API:
GetProcessWorkingSetSize and similar.

Nov 14 '05 #2
>Ba************@aspect-online.de wrote:
Hello NG,

I want to write a c-prg. which examines the current memory-usage and
cpu-usage of the system (win32),
and writes the values to a logfile.

Does anybody know which librarys or functions I should use?

Unfortunately I'm almost new to programming in c :-(

Thanks,

bastian
I think that if you are new to C this is quite difficult to achive. You
need a very good knowledge of the WIN32 API, and of the C language to
write this kind of stuff.


Puh - maybe anybody got some pieces of code...

bastian

I would start by studying the SDK. Specifically look for the API:
GetProcessWorkingSetSize and similar.


Nov 14 '05 #3
Ba************@aspect-online.de wrote:
Ba************@aspect-online.de wrote:
Hello NG,

I want to write a c-prg.

I answered

I think that if you are new to C this is quite difficult to achive. You
need a very good knowledge of the WIN32 API, and of the C language to
write this kind of stuff.

Puh - maybe anybody got some pieces of code...


Sorry, I misunderstood. I thought *you* wanted to write a C program, as
you said. Now it looks as somebody else should do the job for you.

This is very easy. You pay me US$ 500 and I will write it for you.

This newsgroup *can* be understood as a free help desk, but you want
not only that but you want us to do your own work without you making
any effort at all.

Not for free Mr.
Nov 14 '05 #4
>Ba************@aspect-online.de wrote:
Ba************@aspect-online.de wrote:

Hello NG,

I want to write a c-prg.
I answered
Oh sorry, I've forgotten: Thank you very much for your support!

I think that if you are new to C this is quite difficult to achive. You need a very good knowledge of the WIN32 API, and of the C language to
write this kind of stuff.

Puh - maybe anybody got some pieces of code...

Sorry, I misunderstood. I thought *you* wanted to write a C program, as
you said. Now it looks as somebody else should do the job for you.
You really misunderstood! I'm a very lazy sysadmin, and wanted s.o. who
will
do my work ;-)
This is very easy. You pay me US$ 500 and I will write it for you.
Give me your bank connection, and I will speak with my boss...
This newsgroup *can* be understood as a free help desk, but you want
not only that but you want us to do your own work without you making
any effort at all.
I hoped that anybody is/was working on the same problem, and would be
shared
his ideas. As I wrote, I'm very new to programming in c, so it's not easy
to
find a proper solution...
Maybe there are other sources which will help beginners...

I don't want to buden s.o. with coding for me, that's what you've
misunderstood.
Not for free Mr.


Yes, I know we're living in a commercial world...
Nov 14 '05 #5
It works!

The keyword is called "GlobalMemoryStatus" and works with the windows.h -
library.

Link to a german forum, where the same problem was discussed few days ago
(incl. solution):

http://www.c-plusplus.de/forum/viewt...almemorystatus

...if anybody's working on the same problem.

bastian
Nov 14 '05 #6
Bastian wrote
It works!

The keyword is called "GlobalMemoryStatus" and works with the windows.h -
library.

..if anybody's working on the same problem.


I am working on a similar problem, namely trying to make the C language as
it runs on the windows platform relevant here. With your boorish (brauchs
nich nachschlagen--frech) responses to a regular who was trying to help
until you asked him to scrub your bathroom floor, you set me back. I'll be
curious to see how you divine CPU info out of that call and will bet dollars
to donuts that your prog is as robust as a tomato crop on Greenland. MPJ
Nov 14 '05 #7
>>Bastian wrote
It works!

The keyword is called "GlobalMemoryStatus" and works with the windows.h - library.

..if anybody's working on the same problem.

I am working on a similar problem, namely trying to make the C language

asit runs on the windows platform relevant here. With your boorish (brauchsnich nachschlagen--frech) responses to a regular who was trying to help
until you asked him to scrub your bathroom floor, you set me back. I'll becurious to see how you divine CPU info out of that call and will bet dollarsto donuts that your prog is as robust as a tomato crop on Greenland. MPJ


Ups - something get there out-of-control?

I can't remind that I've been boorish to s.o. And I never wrote a response
like "brauchs nich nachschlagen--frech". I haven't ever spoken about
CPU-Info...

I only found an entry in a german forum and copied the link. I also never
posted
to this forum.

If I was boorish, sorry about that - I only asked for help and wanted to
help
these, who are working on the same thing.

bastian
Nov 14 '05 #8
I reviewed my first quote ... sorry.
surely the links discusses only the memory, not the solution to get
cpu-infomations.
Analysing the CPU would be my second step. First of all the solution of
memory usage will rock like descriped above.

Hope I've sorted the things out...

bastian
Nov 14 '05 #9
jacob navia <ja***@jacob.remcomp.fr> writes:
Ba************@aspect-online.de wrote:
Ba************@aspect-online.de wrote:

Hello NG,

I want to write a c-prg.
I answered

I think that if you are new to C this is quite difficult to
achive. You need a very good knowledge of the WIN32 API, and of the
C language to write this kind of stuff.

Puh - maybe anybody got some pieces of code...


Sorry, I misunderstood. I thought *you* wanted to write a C program, as
you said. Now it looks as somebody else should do the job for you.

This is very easy. You pay me US$ 500 and I will write it for you.

This newsgroup *can* be understood as a free help desk, but you want
not only that but you want us to do your own work without you making
any effort at all.

Not for free Mr.


Asking for sample code, or pointers to sample code, is a perfectly
reasonable approach even if you're interested in writing the program
yourself. I don't think the OP was asking anyone to write the program
for him for free (and if he was, "no" is an adequate response).

In any case, the question appears to be WIN32-specific, so this really
isn't the place to discuss it. If you ask in a Windows newsgroup,
probably comp.os.ms-windows.programmer.win32, you'll find people who,
unlike most of us here, can actually tell you about
GetProcessWorkingSetSize.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ben Eisenberg | last post by:
I'm trying to run a php script setuid. I've tried POSIX_setuid but you have to be root to run this. The files are located on a public access unix system and have me as the owner and nobody as the...
4
by: Theron NightStar | last post by:
I am trying to teach myself c++. This is the first program I have ever written that might have an practical use to me. I rather proud of it since like implied - I have no real knowledge of c++. ...
2
by: facicad | last post by:
I would like to set topmost another prog. from my program. Ex: I use AutoCAD, run my prog. from autocad. My prog. is topmost but went I would like to pick some object in autocad, I set TopMost to...
1
by: ניר | last post by:
Hello, I've already sent such a messege, hopping to be answered shortly this time. I am practicing c/c++ programming using microsoft visual c++ express 2005 express edition. Anyway, unlike other...
2
smartway
by: smartway | last post by:
Can we use c++ code in c prog or can we include .cpp in c prog. ? If yes ........ How can we do this?
4
by: Signeg | last post by:
Hey guys, I have some work for university and i never used C++ in my life so i'm kinda lost.. But i've still managed to write something woth it. But too bad for me the prog does compile and lunch...
3
by: McCarthy | last post by:
Im writing a command-line program in unix. Whenever I run the prog in unix it gives me 49 output files instead of the user entered amount. Im not sure what the problem is with my main prog the loop...
1
by: laptop | last post by:
hello frnds im new to this forum, please help me . i have a question paper webpage from where i will be taking answers in form of prog in different languages(perl,php,java,c,c++,python).now since im...
8
by: tvnaidu | last post by:
I am running prog with GDB - throws SIG32, why? @localhost config]# gdb prog GNU gdb Red Hat Linux (5.3.90-0.20030710.40rh) Copyright 2003 Free Software Foundation, Inc. GDB is free software,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.