How to (constantly) monitoring state of static library ?

Merry Christmas, FreeBSD Gurus!

1.
How to monitoring state of static library: CPU, memory, disk I/O, system calls, etc…?

2.
How to useful doing this once, on crone and constantly (mean with saving in rdd DB)…?

Thank You so much!
 
Agree with Eric: They way I read your question, it makes no sense. A static library is a .a file. It doesn't use CPU, memory, or disk IO, until it is linked into an executable. At that point, the executable starts using this type of resource, and that can be monitored (difficultly).

Suggestion: Write a longer paragraph explaining what you are trying to accomplish, maybe then we'll understand. I know there is a language barrier here.
 
Agree with Eric: They way I read your question, it makes no sense. A static library is a .a file. It doesn't use CPU, memory, or disk IO, until it is linked into an executable. At that point, the executable starts using this type of resource, and that can be monitored (difficultly).
It's not like this would be so much different with a shared lib though ... :-/

Suggestion: Write a longer paragraph explaining what you are trying to accomplish, maybe then we'll understand. I know there is a language barrier here.
Yes please. It certainly has this XY-problem-smell (talking about an attempted technical solution instead of the original problem to solve) right now 😉
 
When I open the linked rocketaudioserver file I see a rc.d service daemon.
So I look there and see the executable.
procname="/usr/local/bin/rsas"
So use ps -ax and look for rsas

To monitor it further CPU, Memory = top

disk i/o of an application.... unsure but gstat does all disk I/O. Same with iostat.
 
When I open the linked rocketaudioserver file I see a rc.d service daemon.
So I look there and see the executable.

So use ps -ax and look for rsas
Thank You for detailed reply and suggestion.

How to possible by sh(4) script receiving the set of values of used mem, cpu, interrupts/calls of this binary?

Like “mem 34Mb cpu 12%…” ?

Need to using this in conjunction with Prometheus/Telegraf/Grafana to monitoring the loading state of machine.

To monitor it further CPU, Memory = top

disk i/o of an application.... unsure but gstat does all disk I/O. Same with iostat.
I just using ready-to-go Prometheus/node_exporter module for this :)
 
The easiest way to get the PID is to spawn something:
Code:
% echo $$
2592
% exec sh
$ echo $$
2592
$ exec csh
% echo $$
2592

That said, OP would be better served with jails.
 
Back
Top