Variable to return machine name

   Views 2353   Replies 4   Subscribers 2
User Avatar
Member
102 posts
Joined: 5月 2006
Offline
Hi all!

I am sure I have done this before a few years back but can't for the life of me remember the syntax.

Is there a way I can get the current machine's name as a variable (to put into either a file path or font sop)?

Will be handy for a render node debug scene I am preparing.

I have memory of it being $MACHINE_NAME or $HOSTNAME, something along those lines but any variation on that theme I try comes up blank.

Thanks,
Rich.
Edited by Richard Costin - 2022年4月25日 03:45:31
User Avatar
Member
1772 posts
Joined: 3月 2009
Offline
Don't know if there's an internal mechanism for that, but you can always stick it into a custom environment variable inside your wrapper script (where you set $JOB etc).

Add something like:

export MEINHOST=$(hostname -s)

(when using bash for example) and you can then refer to it inside the Houdini session regularly by $MEINHOST
Martin Winkler
money man at Alarmstart Germany
User Avatar
Member
9130 posts
Joined: 7月 2007
Offline
on my windows machine there seems to be $COMPUTERNAME variable containing the name by default, may differ per OS unless you are creating your own environment
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
102 posts
Joined: 5月 2006
Offline
Thanks guys, most helpful.

$COMPUTERNAME was the one. Must have been the only combo I didn't try!

Thanks again,
Rich.
User Avatar
Member
5 posts
Joined: 3月 2024
Offline
Yes, thanks for the info.
Just what I needed for my local render farm diagnostics.

~joel
  • Quick Links