On Sun, Mar 13, 2011 at 12:12:17PM +0330, Farzin Kamangar wrote:
> We need some way to record login name of machine users, date and
> time of operations to have the information to refer to at a later time.
Having never heard of such functionality, I spent a minute on a crude
wrapper:
Copy this to /usr/local/bin/run_emc »
#!/bin/bash
# Wrapper to record who used emc, when, and for how long.
record=/var/tmp/emc_usage
[ ! -e $record ] && touch $record
# Nothing fancy == easy for anyone to customise:
echo >> $record
whoami >> $record
echo Started EMC2 at: >> $record
date >> $record
/usr/bin/emc
echo Session ended at: >> $record
date >> $record
« - That's all.
Make it executable:
$ chmod a+x /usr/local/bin/run_emc
Try it out:
$ run_emc
OK, now we make swarf, then close the application.
To check the record:
$ more /var/tmp/emc_usage
erik
Started EMC2 at:
Sun Mar 13 20:41:27 EST 2011
Session ended at:
Sun Mar 13 20:41:46 EST 2011
That's an easy way to do it, given that you have individual user
accounts for us to pick up user identification.
Near enough for starters?
Erik
--
The game can also serve as a didactic analogy, used to convey the
somewhat counter-intuitive notion that "design" and "organization"
can spontaneously emerge in the absence of a designer.
- http://en.wikipedia.org/wiki/Conway%27s_life
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users