Open naevtamarkus opened 7 years ago
Hi @naevtamarkus Sorry for the delay in answering. I got caught up with other things in the middle.
You need to open an interactive shell and then load the module with an import like:
import slurm-reports
I haven't tested it, just off the top of my head.
Nonetheless, I guess the problem is you don't have the configuration file that specifies where sacct is installed. The defaults can be seen at https://github.com/Devex/opsworks/blob/1577a668b4915419deb5f8c7ec77619e1230e8ad/zenoss/recipes/default.rb#L126-L138 and the sacct path is missing, which is consistent with your error.
You'll need to create a config file similar to:
[general]
report_title=Report for my cluster
avail_cpu_number=20
sacct_path=/bin/sacct
and specify the correct path for sacct. You can get that with which sacct
in your cluster. You can specify the path to the config file using the flag -c /path/to/config/file
or calling the file config
and calling the command from the same directory.
If you already did that and it still doesn't work, I'll need more info to debug the issue. We can arrange for a call.
Hola Miguel,
I am not able to run your code after installing it:
Maybe it's because of the python installation that I have available (it's not managed by me)... but looking into your code, it seems like everything is confined to a single file. Is there a way that I can run your code from the command line, without having to install it? I tried to add 'cli()' or 'Slurm_Reports().main()' at the end of your code, but without success. (btw I am not a Python expert)
Thanks!