#freeze
*wpserverの状態をconkyで表示させる [#KjDTJnJ]
サーバなので、簡単に表示できればいいです。~
まず、下準備~
 $ sudo apt-get install conky-all
次にPublic IPを表示させたいので、スクリプトを下準備~
 $ gedit ip.sh
 内容は以下の通り。~
 wget http://ipinfo.io/ip -qO -

 $ chmod +x ip.sh
次に.conkyrc
 gedit .conkyrc
 内容は以下の通り。
 alignment top_right
 background yes
 border_width 1
 cpu_avg_samples 2
 default_color white
 default_outline_color white
 default_shade_color white
 double_buffer yes
 draw_borders yes
 draw_graph_borders no
 draw_outline no
 draw_shades no
 use_xft yes
 xftfont TakaoGothic:style=Regular:size=10
 gap_x 10
 gap_y 35
 minimum_size 5 5
 no_buffers yes
 out_to_console no
 out_to_stderr no
 extra_newline no
 stippled_borders 0
 update_interval 1.0
 uppercase no
 use_spacer none
 show_graph_scale no
 show_graph_range no
 own_window yes
 own_window_class Conky
 own_window_type normal
 own_window_transparent no
 own_window_argb_visual yes
 own_window_argb_value 155
 own_window_colour 303030
 own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

 TEXT
 ${color lightgreen}Kernel: $color$kernel
 ${color lightgreen}Uptime: $color$uptime

 ${color lightgreen}-- CPU --
 ${color lightgreen} CPU Freq: $color${freq}MHz
 ${color lightgreen} Core 1  : $color${cpu cpu1}%
 ${color lightgreen} Core 2  : $color${cpu cpu2}%

 ${color lightgreen}-- RAM --
 ${color lightgreen}Ram_max   : $color$memmax
 ${color lightgreen}Ram_use   : $color$mem
 ${color lightgreen}Ram_free  : $color$memeasyfree

 ${color lightgreen}Swap_max  : $color$swapmax
 ${color lightgreen}Swap_use  : $color$swap
 ${color lightgreen}Swap_free : $color$swapfree

 ${color lightgreen}-- Processes --
 ${color lightgreen} Total   : $color$processes
 ${color lightgreen} Run     : $color$running_processes
 ${color lightgreen} Threads : $color$running_threads

 ${color lightgreen}-- Filesystems --
 ${color lightgreen} /     $color${fs_used /}/${fs_size /}
 ${color lightgreen} /home $color${fs_used /home}/${fs_size /home}

 ${color lightgreen}-- Disk Read/Write --
 ${color lightgreen} Read  : $color${diskio_read /dev/sda}
 ${color lightgreen} Write : $color${diskio_write /dev/sda}

 ${color lightgreen}-- Networking --
 ${color lightgreen} enp8s0
 ${color lightgreen}  Up   : $color${upspeed enp8s0}
 ${color lightgreen}  Down : $color${downspeed enp8s0}

 ${color lightgreen}-- Public IP --
 Public IP: $color${exec sh ip.sh}

 ${color lightgreen}-- System temp --
 ${color lightgreen} CPU Core1 : $color${hwmon 1 temp 2} C
 ${color lightgreen} CPU Core2 : $color${hwmon 1 temp 3} C

 ${color lightgreen} Temp1     : $color${hwmon temp 1} C
 ${color lightgreen} Temp2     : $color${hwmon temp 2} C

 ${color lightgreen}-- Process --
 ${color grey}Name              PID   CPU%   MEM%
 ${color lightgreen} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
 ${color lightgreen} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
 ${color lightgreen} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
 ${color lightgreen} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
*start script [#Cb9eMKc]
 $ gedit conky.sh

 sleep 30
 conky

 $ chmod +x conky.sh

 として、自動起動するアプリケーションに入れます。~
 
*ご様子 [#DZRAUNE]
&attachref(./conkywpserver.png);~

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS