标签:monit java ping 分区 显示 report cal add let
[root@localhost ~]# ps aux | sort -k 4 -rn |head qemu 10866 4.5 12.6 17634232 16738712 ? Sl Nov13 704:19 /usr/libexec/qemu-kvm -name vm010 -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off,dump-guest-core=off -cpu Westmere,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+pclmuldq,+dtes64,+monitor,+ds_cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+pcid,+dca,+arat,+pdpe1gb,+rdtscp -m 16384 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 6486aaeb-1094-41ef-b6df-439c36911c78 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-7-vm010/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot menu=on,strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/home/kvm/disk1/v-disk10,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/home/kvm/disk1/test1_add.qcow2,format=qcow2,if=none,id=drive-virtio-disk2,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk2,id=virtio-disk2 -drive if=none,id=drive-ide0-1-1,readonly=on -device ide-cd,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1,bootindex=2 -netdev tap,fd=76,id=hostnet0,vhost=on,vhostfd=81 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:28:56:b9,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input1,bus=usb.0,port=1 -vnc 0.0.0.0:0 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on qemu 1428 2.5 6.3 9230252 8412928 ? Sl Nov11 478:34 /usr/libexec/qemu-kvm -name vm006 -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off,dump-guest-core=off -cpu Westmere,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+pclmuldq,+dtes64,+monitor,+ds_cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+pcid,+dca,+arat,+pdpe1gb,+rdtscp -m 8192 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 84e6e3bb-acba-4dc4-8c70-bc04c21ad172 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-3-vm006/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot menu=on,strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/home/kvm/disk1/v-disk06,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive if=none,id=drive-ide0-1-1,readonly=on -device ide-cd,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1,bootindex=2 -netdev tap,fd=77,id=hostnet0,vhost=on,vhostfd=79 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:62:80:f2,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input1,bus=usb.0,port=1 -vnc 0.0.0.0:2 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on wu.jing 7874 0.1 5.0 39726036 6625260 ? Sl Nov11 22:10 java -Dspring.profiles.active=test -jar crm_service-0.0.1-SNAPSHOT.jar wu.jing 7376 0.1 3.0 39784368 4015384 ? Sl Nov11 19:49 java -Dspring.profiles.active=test -jar psi_report_service-0.0.1-SNAPSHOT.jar wu.jing 7378 0.0 2.9 39045900 3868400 ? Sl Nov11 17:59 java -Dspring.profiles.active=test -jar psi_financial_accounting_service-0.0.1-SNAPSHOT.jar wu.jing 7370 0.0 2.8 39114480 3745900 ? Sl Nov11 18:20 java -Dspring.profiles.active=test -jar psi_sell_service-0.0.1-SNAPSHOT.jar wu.jing 7372 0.6 2.7 42049600 3568228 ? Sl Nov11 123:14 java -Dspring.profiles.active=test -jar psi_inventory_service-0.0.1-SNAPSHOT.jar wu.jing 7366 0.0 2.6 39114480 3482776 ? Sl Nov11 18:16 java -Dspring.profiles.active=test -jar psi_purchase_service-0.0.1-SNAPSHOT.jar wu.jing 7374 0.6 2.5 42116176 3410544 ? Sl Nov11 123:06 java -Dspring.profiles.active=test -jar psi_finance_service-0.0.1-SNAPSHOT.jar wu.jing 7364 0.1 2.5 39322392 3346680 ? Sl Nov11 19:18 java -Dspring.profiles.active=test -jar psi_base_service-0.0.1-SNAPSHOT.jar [root@localhost ~]#
[root@localhost ~]# cat pingIp.sh #!/bin/bash ip=192.168.0. for n in `seq 1 254` do ping -c 2 $ip$n &> /dev/null if (($?==0)) then echo "$ip$n success!" else echo "$ip$n fail!" fi done
[root@localhost ~]# bash pingIp.sh 192.168.0.1 fail! 192.168.0.2 fail! 192.168.0.3 fail! 192.168.0.4 fail! 192.168.0.5 fail! 192.168.0.6 fail! 192.168.0.7 fail!
[root@localhost data]# vi /backup/back_etc.sh
tar cvf /backup/etcbak-`date -d "-1 day" +%F-%H`.tar.xz /etc
[root@localhost data]# crontab -e 30 1 * * 1-5 root /bin/bash /backup/back_etc.sh
[root@localhost data]# vi /monitor/monitor_disk.sh
for i in `df|awk ‘/^\/dev\//{print $5}‘|cut -d ‘%‘ -f1`;do if [ $i -gt 80 ];then # /bin/wall "disk is full" echo "disk is full" | mail -s "json" 117433596@qq.com &> /dev/null fi done
[root@localhost data]# crontab -e
*/10 * * * 1-5 root /bin/bash /monitor/monitor_disk.sh &> /dev/null
标签:monit java ping 分区 显示 report cal add let
原文地址:https://www.cnblogs.com/qqsu007/p/11888322.html