Yahoo web space - Use the cdcommand to move to the directorycontaining
Friday, December 21st, 2007Use the cdcommand to move to the directorycontaining the RPM packages. 4.Type the following command and press Enter: # rpm -Uhv psacct-version.rpmOn SuSE, install the acctpackage with thecommand: #rpm -Uhv acct-version.rpm The installation process creates a new back- ground daemon. To start the psacctservice (or acct, if you rerunning SuSE), follow these steps: 1.Open a terminal window and give yourselfsuperuser privileges with the sucommand. 2.Start the service: If you re running Fedora, the command is# /sbin/service psacct startIf you re running Mandrake, use the command: # /sbin/service psacct startIf you re a SuSE user, start the service with thecommand: # /etc/init.d/acct startNow you re up and running. Linux keeps track ofresource usage in the /var/run/utmpand /var/log/ wtmpfiles. The wtmpfile can grow quickly. It s a good ideato clean it up every now and then. Looking up user login hoursOf all the information you can call up in a flash, sum- maries of user login hours are among the most use- ful. Use the accommand to find out how long (inhours) your users have been logged in. To generatea list of login hours, itemized by user, enter the fol- lowing command: $ ac -pThe result will look something like this: [freddie@bastille freddie]$ ac -pfreddie7.03duncan2.02franklin6.54root1.02total16.61To generate a list of total login hours on a dailybasis, use the -dflag: $ ac -dThe result is a daily list of connect-time hours: [freddie@bastille freddie]$ ac -dFeb 1total0.33Feb 2total12.54Todaytotal1.01One thing to note the daily total is for everyonelogged in. This is a quick way to find out total systemman hours if you need to answer to account- ing about department costs or want to requestmore resources in a budget meeting. The two flags we ve listed are probably the mostuseful, but other flags work with the accommandaswell. Check out the man page for more ideas man ac. Checking out command and program usageAnother useful command that comes courtesy ofsystem accounting is the sacommand. Use the sacommand to find out which programs are being usedon your system. To use the sacommand, first youneed to give yourself superuser privileges with thesu-command. Then to generate a report of com- mand usage, enter the following command: # sa The report shows the command usage for the sys- tem, as shown in Figure 21-5.26_
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.