[HELP] How to install and run Flame Graphs?

ghostwolf59

Contributor
Joined
Mar 2, 2013
Messages
165
Anyone here that installed Flame Graphs (https://www.clamav.net/documents/clamav-development#profiling---flame-graphs) ?

I am trying to get to the bottom of slow scans using clamav and clamav support have suggested installing Flame Graphs as a mean of providing more info.

Not sure where Flame Graphs should be installed though? within clamav's iocage jail or in its own jail?

... and how I then use it to monitor clamav scans?

Any suggestions/hints would be highly appreciated

cheers
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
Probably best to ask Clamav support those questions, to be honest.
 

ghostwolf59

Contributor
Joined
Mar 2, 2013
Messages
165
Probably best to ask Clamav support those questions, to be honest.

ClamAV support dont have any kind of documentation on how to set it up an run it on freenas
It's not a clamav issue really - the stats can be run against anything really so its more about questions surrounding where it should be installed and how its run against whatever....
ClamAV suggested installing it within the same jail as clamav, but my gut feel is that this is wrong advice - considering you might want to run it against other resources or even the entire freenas, it makes more sense to install it in its own jail rather than duplicating the installation across jails down the track.
Read some comments about kicking this off via DTrace, but have no idea how to do this - it should also be run as root
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
Disclaimer, I spent 40 seconds reading manuals just now but I do work with similar systems.

the quick overview is that you need to deploy DTrace to collect data, then you can have flame graphs display queries against that data.
You should be able to do this with a dedicated jail, but a standalone logging server is not unreasonable.

As you will need to install probes to collect data, I’m not sure how well that will work with FreeNAS, but userland probes to monitor services should be doable in a jail.
 

ghostwolf59

Contributor
Joined
Mar 2, 2013
Messages
165
Disclaimer, I spent 40 seconds reading manuals just now but I do work with similar systems.

the quick overview is that you need to deploy DTrace to collect data, then you can have flame graphs display queries against that data.
You should be able to do this with a dedicated jail, but a standalone logging server is not unreasonable.

As you will need to install probes to collect data, I’m not sure how well that will work with FreeNAS, but userland probes to monitor services should be doable in a jail.

Well, I have no dedicated server put aside, so whatever happens I need to do this on freenas itself.
If its doable, then do you by any chance have an idea how to run Dtrace as root tapping into flamegraphs that in turn poll some set activity?
Dont even know where to start with this - thinking that I might need a script kicked off as root that in turn spawn into a set jail to poll.
But considering
1. clamav *in this case* that runs in its own jail on demand *or via scheduled cron jobs*
2. FlameGraphs installed in its own jail *that technically could be used to scan anything/entire server/cpu alone etc
3. as root on server level kicking off a cron or on demand script that in essence does "iocage exec <jailname>shellscript [params]"

It quickly become convoluted and complex and even though you might have spent 40 seconds reading the manual, your knowledge may be more than mine when it comes to getting something like this in place.
 
Top