- removed comment
Provide a way to query mdb entries for the current machine
Issue #917
new
I would like to find out the value of the "basedir" entry in the MDB for the current machine. I currently have to do:
simdir=$(sim print-mdb-entry datura|grep '^[ \t]*basedir[ \t]*=[ \t]\(.*\)[\t ]*$'|awk '{print $3}')
This is quite ugly, and also requires me to know that the current machine is "datura". I would like to be able to do
sim print-mdb-entry basedir
and have it print the value of basedir for the current machine. If I instead specify a different machine,
sim --machine ranger print-mdb-entry basedir
then it could print the value for the other machine. This would be much more intuitive and useful than the current behaviour.
Keyword:
Comments (1)
-
reporter - Log in to comment
I just discovered "sim get-output-dir <sim>". This was what I was trying to ultimately compute.
[ianhin@login-damiana EinsteinToolkitTests]$ sim get-output-dir EinsteinToolkitTests_f1e7cc6bccfee780c84e05fbb6f2889ea598d7c8_1 Simulation name: EinsteinToolkitTests_f1e7cc6bccfee780c84e05fbb6f2889ea598d7c8_1 Output directory: /lustre/datura/ianhin/simulations/EinsteinToolkitTests_f1e7cc6bccfee780c84e05fbb6f2889ea598d7c8_1/output-0000/
This is not very useful for use from a script. I would prefer that it just gave me the output directory rather than all that extra information which then needs to be parsed away.
Still, I think the above would be a useful modification to print-mdb-entry.