Systemdiag via c.prog

B

Bastian.Zacher

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
 
J

jacob navia

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.
 
B

Bastian.Zacher

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
 
J

jacob navia

I answered
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.
 
B

Bastian.Zacher

I answered

Oh sorry, I've forgotten: Thank you very much for your support!
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...
 
M

Merrill & Michele

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
 
B

Bastian.Zacher

Bastian wrote
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

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
 
B

Bastian.Zacher

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
 
K

Keith Thompson

jacob navia said:
I answered


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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,147
Messages
2,570,833
Members
47,378
Latest member
BlakeLig

Latest Threads

Top