Accounting Accounting collects information about users and processes

Slides:



Advertisements
Similar presentations
ITR3 lecture 7: more introduction to UNIX Thomas Krichel
Advertisements

Introduction to Linux Linux startup process Unix Shells and scripts.
Basic Unix system administration
The Components There are three main components of inDepth Lite, inDepth and inDepth+ Real Time Component Reporting Package Configuration Tools.
Using tcpdump. tcpdump is a powerful tool that allows us to sniff network packets and make some statistical analysis out of those dumps. tcpdump operates.
MCTS GUIDE TO MICROSOFT WINDOWS 7 Chapter 10 Performance Tuning.
OpenVMS System Management A different perspective by Andy Park TrueBit b.v.
2000 Copyrights, Danielle S. Lahmani UNIX Tools G , Fall 2000 Danielle S. Lahmani Lecture 12.
Chapter 2 Accessing Your System and the Common Desktop Environment.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 11: Monitoring Server Performance.
Chapter 14 Chapter 14: Server Monitoring and Optimization.
CS 497C – Introduction to UNIX Lecture 27: - The Process Chin-Chih Chang
System Startup and Shutdown
MCITP Guide to Microsoft Windows Server 2008 Server Administration (Exam #70-646) Chapter 14 Server and Network Monitoring.
MCTS Guide to Microsoft Windows Server 2008 Network Infrastructure Configuration Chapter 11 Managing and Monitoring a Windows Server 2008 Network.
Hands-On Microsoft Windows Server 2008 Chapter 11 Server and Network Monitoring.
11 MAINTAINING THE OPERATING SYSTEM Chapter 5. Chapter 5: MAINTAINING THE OPERATING SYSTEM2 CHAPTER OVERVIEW Understand the difference between service.
Maintaining Host Security Logs.  Security logs are invaluable for verifying whether the host's defenses are operating properly.  Another reason to maintain.
11 MAINTAINING THE OPERATING SYSTEM Chapter 5. Chapter 5: MAINTAINING THE OPERATING SYSTEM2 CHAPTER OVERVIEW  Understand the difference between service.
Installing Windows Vista Lesson 2. Skills Matrix Technology SkillObjective DomainObjective # Performing a Clean Installation Set up Windows Vista as the.
1 Chapter Overview Monitoring Server Performance Monitoring Shared Resources Microsoft Windows 2000 Auditing.
Linux Operations and Administration
Hands-On Microsoft Windows Server 2008
FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.
MCTS Guide to Microsoft Windows 7
System Monitoring and Automation CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
Module 7: Fundamentals of Administering Windows Server 2008.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
Module 10: Monitoring ISA Server Overview Monitoring Overview Configuring Alerts Configuring Session Monitoring Configuring Logging Configuring.
Gauge Operation and Software by Scott A. Ager. Computer Recommendations 750 MHz Pentium III 64 Meg SRAM 40 Gig Hard Drive 1024 x 768 graphics CD Writer.
System Monitoring and Automation. 2 Section Overview Automation of Periodic Tasks Scheduling and Cron Syslog Accounting.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
PvD Troubleshooting and Support Shane Broomhall APAC Readiness.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
Ch11: Syslog and Logfiles Presented by: Apichana Thiantanawat 06/11/02.
1 Periodic Processes and the cron Daemon The cron daemon is where all timed events are initiated. The cron system is serviced by the cron daemon. What.
Core System Services. INIT Daemon The init process is the patron of all processes. first process that gets started in any Linux/ UNIX -based system.
Basic Systems and Software. Were we left off Computers are programmable (formal) machines. Digital information is stored as a series of two states (1.
Λειτουργικά Συστήματα - Lab1 Γιάννης Πετράκης. The Operating System  Unix is a layered operating system  The innermost layer is the hardware that provides.
System Administration – Part 2. Devices in UNIX are files: A device can be accessed with different file names All device files are stored in /dev or its.
UNIX Unit 1- Architecture of Unix - By Pratima.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
System Administration. Logging in as System Administrator System Admin login (aka superuser, aka root) –login id: root –Default PS1 prompt: # –Home directory:
File system In computing, a file system is a method of storing and organizing computer files and the data they contain to make it easy to find and access.
Copyright © Curt Hill Operating Systems An Introductory Overview.
SQL SERVER 2008 Installation Guide A Step by Step Guide Prepared by Hassan Tariq.
1 Lecture 19: Unix signals and Terminal management n what is a signal n signal handling u kernel u user n signal generation n signal example usage n terminal.
Running the Operational Codes for the Brahmaputra Tom Hopson.
© ABB Entrelec AC 500 Page SD Memory Card Insert image here The Application of the SD Memory Card Advant Controller 500.
2Operating Systems  Program that runs on a computer  Manages hardware resources  Allows for execution of programs  Acts as an intermediary between.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Module 9: Preparing to Administer a Server
Chapter Objectives In this chapter, you will learn:
Introduction to Operating Systems
Chapter 9 Periodic Processes
MCTS Guide to Microsoft Windows 7
QlikView Licensing.
System Administration
Introduction to Computers
Chapter 6: Network Layer
Integration of Singularity With Makeflow
CONFIGURING HARDWARE DEVICE & START UP PROCESS
SUSE Linux Enterprise Desktop Administration
Version A.01 H3064S Module 14 Slides
Periodic Processes Chapter 9.
File System Management
Module 9: Preparing to Administer a Server
Andy Wang CIS Computer Systems Performance Analysis
Configuring Disk Quotas
Presentation transcript:

Accounting Accounting collects information about users and processes useful data for monitoring a system Unix accounting is remarkably comprehensive Accounting uses up vast amount of disk space /var/log/wtmp historical list of user logins /var/log/savacct summary of system process accounting command /var/log/useracct summary of system process accounting user /var/log/sa system accounting log storage If accounting is enabled run cron jobs to gather data data collection resets the wtmp and pacct files accounting usually started by /etc/init.d/acct Commands Function sa summary accounting for system and user ac user accounting accton start and stop accounting In order to use accounting you need to install package called acct: emerge –s acct Accounting is normally switched on and off when the system runs in multi-user mode (sometimes enabled for higher run levels like 3 or 4 so that accounting can be used selectively). To enable accounting at system boot: rc-update add acct default To start accounting now directly: /etc/init.d/acct start You must have kernel support for accounting. You might have the pleasure to recompile your kernel. Whilst preparing kernel with menuconfig this is found in: General Setup -> BSD Process Accounting BSD Process Accounting version 3 file format Auditing Support Enable system-call auditing support

Display system accounting Use sa to display system accounting data Command show resoucres used in system Useful options -a Force sa not to sort those command names with unprintable characters and those used -c Print percentages of total time for the command's user, system, and real time values. -d Sort the output by the average number of disk I/O operations. -k Sort the output by cpu time average memory usage. -m Print the number of processes and number of CPU minutes on a per-user basis. -t For each entry, print the ratio of real time to the sum of system and user times. -u For each command in the accounting file, print the userid and command name. sa summarizes information about previously executed commands as recorded in the acct file.In addition, it condenses this data into a summary file named savacct which contains the number of times the command was called and the system resources used. The information can also be summarized on a per-user basis; sa will save this information into a file named usracct. If no arguments are specified, sa will print information about all of the commands in the acct file. If called with a file name as the last argument, sa will use that file instead of the system's default acct file. By default, sa will sort the output by sum of user and system time. If command names have unprintable characters, or are only called once, sa will sort them into a group called `***other'. If more than one sorting option is specified, the list will be sorted by the one specified last on the command line. To make sa work proper, you must collect data at periodic intervals, fx with crontab: Add a textfile with this content in /etc/cron.d/sysstat: # Run system activity accounting tool every 10 minutes */10 * * * * root /usr/lib/sa/sa1 -d 1 1 # 0 * * * * root /usr/lib/sa/sa1 -d 600 6 & # Generate a daily summary of process accounting at 23:53 53 23 * * * root /usr/lib/sa/sa2 -A

Display user accounting Use ac to display user accounting data Useful options -d, --daily-totals connect time in hours Print totals for each day rather than just one big total at the end. The output looks like this: Jul 3 total 1.17 Jul 4 total 2.10 Jul 5 total 8.23 Jul 6 total 2.10 Jul 7 total 0.30 -p, --individual-totals Print time totals for each user in addition to the usual everything-lumped-into-one value. It looks like: bob 8.06 goff 0.60 maley 7.37 root 0.12 total 16.15 ac prints out a report of connect time (in hours) based on the logins/logouts in the current wtmp file. A total is also printed out. The accounting file wtmp is maintained by init(8) and login(1). Neither ac nor login cre¡ates the wtmp if it doesn't exist, no accounting is done. To begin accounting, create the file with a length of zero. NOTE: Fhe wtmp file can get really big, really fast. You might want to trim it every once and a while.