[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: Machine Information under Linux

It is obvious how to fetch this information under a shell, but how can I do
it under MATLAB? Can I invoke MATLAB system calls, much as in the C function
system()?

Roy


"Steven Lord" <slord@mathworks.com> wrote in message
news:c12f45$2i0$1@fred.mathworks.com...
> Roy S Schestowitz wrote:
> > As a follow-up to a previous question of mine, is there a way of
> > finding out the domain name, IP address, machine name, current user
> > or any other identifier of a session under Linux? I need to extract
> > this information under MATLAB to differentiate several instances of
> > GUI Windows residing on separate workstations. Most people appear to
> > use MATLAB under Window$ so I found previous suggestions to be futile.
> >
> > Roy
>
> For current user, I believe "whoami" will work; you could also use "echo
~"
> to get the current user's home directory name.  "uname" has a flag that
> allows you to get the machine name.  "host <machine name>" may work to get
> you the IP address; I believe it assumes that the machine whose name you
> specified is in the current domain if you don't provide a domain name
(i.e.
> "host mymachine" would look for the IP address for mymachine.mathworks.com
> since that's my domain), but I could be wrong.  For most of these commands
> you'd need to parse the output of the SYSTEM command operating on them,
but
> it shouldn't be too hard to do that.
>
> -- 
> Steve Lord
> slord@mathworks.com
>
>


[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index