Running app after logout and monitoring

Hello!

I just programmed a very simple app, it's function is to report every minute the state of the memory and cpu and put it to and xml.

All this stuff is working ok since I'm logged in into the machine, but i want it to run as a service, how can I do that??

P.S: Any one knows how can I monitorize the network trafic?? only the gigabit card, not all the network, is only to see if I'm optimizing it's use.

at a very basic level, check if nohup can solve your problem