[VMware ESXi][SNMP]

No Comments

REF: https://support.auvik.com/hc/en-us/articles/206311526-How-to-enable-SNMP-on-a-VMware-ESXi-hypervisor#topic_esx6

How to enable SNMP on ESXi 6.x

SSH or Telnet to your ESXi node using root-level credentials.
Execute the following commands. Replace YOUR_STRING with your desired community string.

esxcli system snmp set -r
esxcli system snmp set -c YOUR_STRING
esxcli system snmp set -p 161
esxcli system snmp set -L “City, State, Country”
esxcli system snmp set -C noc@example.com
esxcli system snmp set -e yes

[VMware][ESXi][crontab] 移除特定日期以前的目錄或映像檔資料

No Comments

#!/usr/bin/expect
spawn ssh "root@ip-or-hostname"
expect "*assword: "
send -- "your-password\n"
expect "\[root@ip-or-hostname:~\] "
#send -- "hostname\n"
#send -- "/bin/sh /vmfs/volumes/datastore1/ghettoVCB/bin/ghettoVCB.sh -g /vmfs/volumes/datastore1/ghettoVCB/backup.conf -m vmguest-name\n"

send -- "echo \"Processing vmguest-name archives\"\n"
send -- "cd /vmfs/volumes/vm-bak/vmguest-name\n"
send -- "ls -t | grep -v `date -D %s +\"%Y-%m-%d\" -d \$((\$( date +%s) - 0 ))`  | grep -v `date -D %s +\"%Y-%m-%d\" -d \$((\$( date +%s) -86400 ))` | grep -v `date -D %s +\"%Y-%m-%d\" -d \$((\$( date +%s) - 172800 ))` > list2del.txt\n"
send -- "cat list2del.txt\n"
send -- "rm -rf `cat list2del.txt`\n"
send -- "rm -f list2del.txt\n"

expect eof

[軟體開發][工具][連結] “微軟詳解 .NET 語言戰略:C#、VB、F# 都不落”

No Comments

REF: 微軟詳解 .NET 語言戰略:C#、VB、F# 都不落
原文網址:https://read01.com/MayEdM.html