Linux System Administration and Configuration. Related Yo. Linux Configuration and Admin Tutorials. The Linux boot process. Quotas: Assign disk resource limits to users or groups. Managing groups and user security: Linux Networking tutorial. DHCP Server tutorial. NIS Server / Client configuration tutorial. Configuring an internet web server. Apache, DNS, FTP.. Internet Server Security. System optimization: System re- configuration: Commands used to re- configure video, keyboard, mouse, date/time, sound card, NIC, Printer.. Installing a new kernel RPMYo. Linux Tutorials Index. Monitoring the system: Basic command line: pstree Processes and parent- child relationshipstop Show top processesmpstat Report processors related statistics. Example: mpstat - A(Ubuntu install: apt- get install sysstat)dstat generate system resource statistics report. Examples: dstat - a, dstat - f(Ubuntu install: apt- get install dstat)iostat Report CPU statistics and input/output statistics for devices and partitions. Report virtual memory statisticsstat display file or file system status. Example: stat - f /dev/sda. NFS statistics(Ubuntu install: apt- get install nfs- common). Display Linux kernel version in use. Display Red Hat Linux Release. Tell how long the system has been running. Also number of users and system's load average. Show who is logged on and what they are doing./sbin/lsmod. List all currently loaded kernel modules. Same as cat /proc/modules/sbin/runlevel. Displays the system's current runlevel. Displays/changes the system's node name. Must also manually change hostname setting in /etc/sysconfig/network. Command will change entry in /etc/hosts)service. Red Hat/Fedora command to display status of system services. Example: service - -status- all. Help: service - -help. Also see ntpstat. GUI/Graphical: gnome- system- monitor. Operating system monitor and usage graphing. Graphical system monitor. Additional RPM package: gkrellm)ps. D load meter. Very cool 3- D graphics. Operating system monitor: load, memory, swap, net, disk, .. List of tools. Process Management. Processes execute within their own process environment, they have their own memory, current working directory, priority, process ID, parent process ID and the file access privileges of the user ID under which they execute. The basic Linux monitoring commands such as pstree and ps - auxw. You need to load the VirtIO driver. 1. On the Navigation Tabs, click Change CD From the drop down list select the virtio CD and click ok. On the console, click "Load. Linux System Administration and Configuration After installation, Linux requires configuration and systems administration. Corporate systems need monitoring, backups. Install Zabbix server (Network Monitoring tool) on CentOS/RHEL 7/6/5. This guide will help you to step by step install zabbix server on linux system. The package can be installed from: a default Red Hat or CentOS repository. This is the quickest way, but generally the provided package is outdated. Sometimes a process must be terminated. To terminate a process. Identify the process. OR. ps - auxw. OR. Kill the process. This will perform an orderly shutdown of the process. If it hangs give a stronger signal with. This method is not as sanitary and thus less preferred. A signal may be given to the process. The program must be programmed to handle the given signal. See /usr/include/bits/signum. For example, to restart a process after updating it's configuration file. HUP < process- id- number>. In the previous example, the HUP signal was sent to the process. The software was written to trap for the signal so that it could respond. If the software (command) is not written to respond to a particular. Identify all known signals: fuser - l. Process Monitoring and Management GUI Tools: xosview: Oldie but goodie. Su. SE). QPS (See below). Also see the GUI tool QPS. Handles MOSIX cluster). This tool is outstanding for monitoring, adjusting nice values (priorities). RPM available from this site. It is so simple to use, no instructions are necessary. It can monitor a program to make sure it isn't doing something bad. It is also reverse engineer what applications are doing and the environments. I love this tool!! Note: The RPM provided was compiled for Red. Hat 7. x. For Red. Hat 8. 0+ one must. QT library RPMs to satisfy dependencies. Xt- 2. 3. 1- 8. i. Then install qps: rpm - ivh qps- 1. Note Fedora Core 3: rpm - ivh qt. These older RH 8. AMD6. 4 Fedora Core 3 x. OS system. Configuring QPS to run applications against a process: Select "Command" + "Edit Commands.." + "Add..". Description: GDB. Command Line: xterm - T "GDB %C" - e gdb - d /directory- where- source- code- is- located - -pid=%p. Description: gdb. Command Line: xterm - T "gdb %c (%p)" - e gdb /proc/%p/exe %p & (As issued in RPM). Description: strace. Command Line: xterm - T "strace %c (%p)" - e sh - c 'strace - f - p%p; sleep 1. Try it with the process qps itself.). Show output written by process. T "strace %c (%p)" - e sh - c 'strace - f - q - e trace=write - p%p; sleep 1. Description: truss (Solaris command). Command Line: xterm - T "truss %C (%p) - e sh - c 'truss - f - p %p; sleep 1. Process Priority Control. Multi- tasking operating systems executes processes in a time slice fashion sharing the processing resources base on their current privilege. Privileges are not constant and elevate if they have not received an execution allocation in the processor after a given time. This is to ensure that all processes get executed regardless of priority although a process can get squeezed out of the time allocation alltogether if the system is overloaded. Higher priority processes may get more time allocated on the processor than a lower priority process but it is likely that the lower process will get some processor allocation. Many system process which manage the system environment execute at an elevated priority in order to guarentee that they get executed. User processes can have their priority elevated using the nice command. Nice values have a range from - 2. Beware that if the priority is elevated higer than a system process, the behavior of the system may be compromised. Modify process scheduling priority. Lower scheduling priority (runs slower and less likely to slow you down.). Default for "nice - n" is 1. Show default for any process: nice executable. Shows nice value to be used if run. IPCs: Semaphores, Shared Memory and Queues. Note that some processes may use Linux Inter. Process Communication or IPC. Identify the semaphores: ipcsipcs - q List share queues. Shared memory. ipcs - s List Semaphores. Remove the semaphores: ipcrm - s < ipcs id>. Example: If you are running Apache, you may see the following. DIR]# ipcs - m - -- -- - Shared Memory Segments - -- -- -- -key shmid owner perms bytes nattch status 0x. Processes attached to open files or open network ports. The command lsof. List processes attached to a given file: lsof filename. DIR]# lsof /var/log/mailman/qrunner. REG 3,5 6. 57 4. REG 3,5 6. 57 4. REG 3,5 6. 57 4. REG 3,5 6. 57 4. REG 3,5 6. 57 4. REG 3,5 6. 57 4. REG 3,5 6. 57 4. REG 3,5 6. 57 4. The process attached to an open file can be killed using the command. List all open files on system: lsof(Long list). List all files opened by user: lsof - u user- id. The commands netstat - punta and socklist will list open network connections. Use the command lsof - i TCP: port- number to see the processes attached to the port. Example. [root@node DIR]# lsof - i TCP: 3. COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME. IPv. 4 7. 56. 00. TCP *: ldap (LISTEN). IPv. 4 7. 56. 00. TCP *: ldap (LISTEN). IPv. 4 7. 56. 00. TCP *: ldap (LISTEN). IPv. 4 7. 56. 00. TCP *: ldap (LISTEN). IPv. 4 7. 56. 00. TCP *: ldap (LISTEN). This shows that the command slapd running under user id ldap. Restricting user resources: ulimit: (bash shell command). Shell and process resources may be controlled and reported using the. Display the limits of a shell using the bash command. Limits can be set for the number of open files and. View file size limits: ulimit - f. See limits assigned in /etc/security (discussed below). Process Commands: nohup - run a command immune to hangups, with output to a non- tty. Linux Commands to Monitor Memory Usage: vmstat Monitor virtual memoryfree Display amount of free and used memory in the system. Also: cat /proc/meminfo)pmap Display/examine memory map and libraries (so). Usage: pmap pidtop Show top processessar - B Show statistics on page swapping. Show system page size, page faults, etc of a process during execution. Note you must fully qualify the command as "/usr/bin/time" to avoid using the bash shell command "time". Display virtual memory "free pages". One may increase/decrease this limit: echo 3. Show memory size and usage. Examination of memory usage: Show system page size: /usr/bin/time - v date .. Page size (bytes): 4. Exit status: 0. Show paging: /usr/bin/time - v firefox .. Major (requiring I/O) page faults: 2. Minor (reclaiming a frame) page faults: 1. Voluntary context switches: 3. Involuntary context switches: 3. Mem. Total: View system memory limits: grep Mem. Total /proc/meminfo. Mem. Total: 7. RHEL6] なぜか使えないwgetやyumをproxyやサブスクリプションの壁を超えて実行する方法 | 迷走男子!!何かと問題が起こるproxyサーバ下での作業ですが、とにかくyumやwgetが使えないという問題がよく起こってそれで一日が終わってしまうこと請け合い!!というわけで、1日かからずに1. OK!)# export http_proxy=http: //tazakazushi. Red. Hatはデフォルトだとサブスクリプションがないとyumを使えない。yumをやろうとすると、こんなエラー?メッセージが必ず流る。. Loaded plugins: product- id, refresh- packagekit, security, subscription- manager. This system is not registered to Red Hat Subscription Management. You can use subscription- manager to register.# yum install php. Loaded plugins: product- id,refresh- packagekit,security,subscription- manager. Thissystem isnotregistered to. Red Hat Subscription Management. You can usesubscription- manager toregister.これには困っちゃいますが、以下の手順でyumが使えるようになるみたい。(dag repositoryの追加)とりあえず、以下で自分のOSに対応するバージョンを探しておいて下さい。http: //dag. Cent. OSのレポジトリを追加とりあえず、Cent. OSのレポジトリを追加してあげたら、いろいろインストールできるようになった。Cent. OSのレポジトリの追加は以下の要領。. Cent. OS- Base. repo. Cent. OS- $releasever - Base. RPM- GPG- KEY- Cent. OS- 6. name=Cent. OS- $releasever - Updates. RPM- GPG- KEY- Cent. OS- 6. name=Cent. OS- 6. 4 - Extras. RPM- GPG- KEY- Cent. OS- 6. (: wqで終了)1. Cent. OS- Base. repo(以下をコピー)[base]name=Cent. OS- $releasever- Basemirrorlist=http: //mirrorlist. RPM- GPG- KEY- Cent. OS- 6[updates]name=Cent. OS- $releasever- Updatesmirrorlist=http: //mirrorlist. RPM- GPG- KEY- Cent. OS- 6[extras]name=Cent. OS- 6. 4- Extrasmirrorlist=http: //mirrorlist. RPM- GPG- KEY- Cent. OS- 6(: wqで終了)どうも「$releasever」という変数を使って記載してあったサイトもあったんですが、それだと「6server」と置換されてうまくいかなかったので、直接「6. RHEL][yum] Cent. OS6. Backend. pyというのがいるせいで作業できない!みたいな状態になることがありました。基本的には待っているとこのバックエンド作業が終わって、問題なくyumが使えるようになるんですが、どうしても問題が残る場合には、いかのようにすれば良いみたいです。. Red. Hatの場合は「/etc/sysconfig/rhn/up. Proxy=http: //proxy. Proxy=1…http. Proxy=http: //proxy. Cent. OSの場合は場所が違って、「/etc/yum.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2017
Categories |