i actually found another way around my situation... i am developing a USB WWW project and i was trying to link to the mysql logs for display... when the filename isnt specified it defaults to the machine name...
so to make it easier i defined the log name and voila i dont need to worry about it
BUT its good to know how to grab that variable using getenv
thanks to you both for your help