vmstat
使用中のSWAPはmemory(smpd) 空き容量はmemory(free)
free
現在のメモリの使用状況を表示する。
オプション
-b サイズをバイト表示する。
-k サイズをkバイト表示する。
-m サイズをMバイト表示する。
-t トータルサイズを表示する。
ps aux
実行中のプロセスを表示する。
'# Excel作成
Public Sub mkExcel_withInvoice()
On Error GoTo Exception
Dim xl As Object
Dim xl2 As Object
Dim TempPath As String
Dim Template As String
Dim SavePath As String
Dim FileName As String
TempPath = "C:\"
Template = TempPath & "雛型.xls"
SavePath = Environ("USERPROFILE") & "\デスクトップ\"
FileName = SavePath & "シートを別ファイルにコピー.xls"
FileCopy Template, FileName
Set xl = GetObject(FileName, "Excel.Sheet")
xl.Parent.Windows(1).Visible = True
Private Sub Example()
If PingResult("192.168.1.1") = False Then
MsgBox "PCが起動していません。"
Else
MsgBox "PCは起動しています。"
End If
End Sub
Function PingResult(strHostname As String)
Dim objWMIService As Object, objStatus As Variant
Set objWMIService = _
GetObject("winmgmts:{impersonationLevel=impersonate}"). _
ExecQuery("select * from Win32_PingStatus where address = '" & _
strHostname & "'", , 48)
For Each objStatus In objWMIService
If IsNull(objStatus.StatusCode) Or objStatus.StatusCode <> 0 Then
PingResult = False
Else
PingResult = True
End If
Next
End Function