]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/systemadmin/README.md
3a9d9de661840454ec97446b0c3d58e6b79bd5d5
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / systemadmin / README.md
1 # Systemadmin plugin
2
3 This plugin adds a series of aliases and functions which make a System Administrator's life easier.
4  
5 To use it, add `systemadmin` to the plugins array in your zshrc file:
6
7 ```zsh
8 plugins=(... systemadmin)
9 ```
10
11 ## Aliases
12
13 | Alias   | Command                                                                    | Description                                                        |
14 |---------|----------------------------------------------------------------------------|--------------------------------------------------------------------|
15 | ping    | `ping -c 5`                                                                | Sends only 5 ICMP Messages                                         |
16 | clr     | `clear; echo Currently logged in on $TTY, as $USERNAME in directory $PWD.` | Clears the screen and prints the current user, TTY, and directory  |
17 | path    | `print -l $path`                                                           | Displays PATH with each entry on a separate line                   |
18 | mkdir   | `mkdir -pv`                                                                | Automatically create parent directories and display verbose output |
19 | psmem   | `ps -e -orss=,args= \| sort -b -k1 -nr`                                    | Display the processes using the most memory                        |
20 | psmem10 | `ps -e -orss=,args= \| sort -b -k1 -nr \| head -n 10`                      | Display the top 10 processes using the most memory                 |
21 | pscpu   | `ps -e -o pcpu,cpu,nice,state,cputime,args \|sort -k1 -nr`                 | Display the top processes using the most CPU                       |
22 | pscpu10 | `ps -e -o pcpu,cpu,nice,state,cputime,args \|sort -k1 -nr \| head -n 10`   | Display the top 10 processes using the most CPU                    |
23 | hist10  | `print -l ${(o)history%% *} \| uniq -c \| sort -nr \| head -n 10`          | Display the top 10 most used commands in the history               |
24
25 ## Functions
26
27 | Function    |  Description                                                                                                          |
28 |-------------|-----------------------------------------------------------------------------------------------------------------------|
29 | dls         | List only directories in the current directory                                                                        |
30 | psgrep      | List all processes that match the pattern input after the command                                                     |
31 | killit      | Kills any process that matches a regular expression passed to it                                                      |
32 | tree        | List contents of directories in a tree-like format (if tree isn't installed)                                          |
33 | sortcons    | Sort connections by state                                                                                             |
34 | con80       | View all 80 Port Connections                                                                                          |
35 | sortconip   | On the connected IP sorted by the number of connections                                                               |
36 | req20       | List the top 20 requests on port 80                                                                                   |
37 | http20      | List the top 20 connections to port 80 based on tcpdump data                                                          |
38 | timewait20  | List the top 20 time_wait connections                                                                                 |
39 | syn20       | List the top 20 SYN connections                                                                                       |
40 | port_pro    | Output all processes according to the port number                                                                     |
41 | accessip10  | List the top 10 accesses to the ip address in the nginx/access.log file or another log file if specified              |
42 | visitpage20 | List the top 20 most visited files or pages in the nginx/access.log file or another log file if specified             |
43 | consume100  | List the 100 most time-consuming Page lists (more than 60 seconds) as well as the corresponding number of occurrences |
44 | webtraffic  | List website traffic statistics in GB from the nginx/access.log file or another log file if specified                 |
45 | c404        | List statistics on 404 connections in the nginx/access.log file or another log file if specified                      |
46 | httpstatus  | List statistics based on http status in the nginx/access.log file or another log file if specified                    |
47 | d0          | Delete 0 byte files recursively in the current directory or another if specified                                      |
48 | geteip      | Gather information regarding an external IP address using [icanhazip.com](https://icanhazip.com)                      |
49 | getip       | Determine the local IP Address with `ip addr` or `ifconfig`                                                           |
50 | clrz        | Clear zombie processes                                                                                                |
51 | conssec     | Show number of concurrent connections per second based on ngnix/access.log file or another log file if specified      |