Enthusiast
Enthusiast

How to monitor the ESXi 5.x ramdisk

Jump to solution

Hi,

we currently had a filled up root filesystem in the ramdisk on several ESXi 5.0 hosts.

~# vdf -h
[...]
-----
Ramdisk                   Size      Used Available Use% Mounted on
root                       32M       32M        0B 100% --
etc                        28M      276K       27M   0% --
tmp                       192M       28K      191M   0% --
hostdstats               1053M       11M     1041M   1% --

AFAIK this is not monitored by the vCenter.

How can I monitor the ramdisk?

The culprit was a 3rd party plugin logging somewhere in /opt. Deleting the logs did the trick.

I've seen a crond command - is this a real cron deamon? How can I configure it? I haven't seen a crontab file. And where can I place some scripts?

All this must survive a reboot, otherwise it's useless. Smiley Wink

Tags (3)
1 Solution

Accepted Solutions
Enthusiast
Enthusiast

A possible solution:

Create your own Alarm Definition:

- New Alarm

- Alarm Type:

  Monitor: Hosts

  [x] Monitor for specific events...

- Triggers

->  Add

      Event: choose an arbitrary event and overwrite it completely with: esx.problem.visorfs.ramdisk.full

      Status: Alert

      Conditions - (do not edit)

That's it. Now you get an alarm if the root ramdisk gets completely filled up, for whatever reason. Not a 100% solution AND I did not get it working with vSphere 6.5 / 6.7 ... I can not overwrite the predefined events or add an own event. 😞

View solution in original post

0 Kudos
4 Replies
Community Manager
Community Manager

There is a crond running on ESXi, take a look at the cronjob section in my ghettoVCB document for more details - http://communities.vmware.com/docs/DOC-8760

Enthusiast
Enthusiast

Cool Smiley Happy

That's exactly what I was looking for.

Thanks a lot!

Now there's only one question left - how can I monitor the utilization of the ramdisk?

Using SSH is not possible. 😕

0 Kudos
Enthusiast
Enthusiast

A possible solution:

Create your own Alarm Definition:

- New Alarm

- Alarm Type:

  Monitor: Hosts

  [x] Monitor for specific events...

- Triggers

->  Add

      Event: choose an arbitrary event and overwrite it completely with: esx.problem.visorfs.ramdisk.full

      Status: Alert

      Conditions - (do not edit)

That's it. Now you get an alarm if the root ramdisk gets completely filled up, for whatever reason. Not a 100% solution AND I did not get it working with vSphere 6.5 / 6.7 ... I can not overwrite the predefined events or add an own event. 😞

View solution in original post

0 Kudos
Contributor
Contributor

#Mail SMTP Server

$smtp = "192.192.192.10"

#Sender

$Sender = "vap02@gmail.com"

#Recipient/s

$Receipient = "harsh.gupta@gmail.com"

$Prioritystate="High"

#Connect to the vCenter instance

Connect-VIServer -Server vap02.gmail.com -User 'gmail\harsh.gupta'

#Get the list of Hosts

$VMHosts = Get-VMHost #or you can use get-cluster put_your_cluster_name

#Cycle through the list of hosts

ForEach ($ESXiHost in $VMHosts) {

#Set up the esxcli instance

    $esxcli = Get-EsxCli -VMhost $ESXiHost.Name -V2

#Gather ramdisk usage stats (Runs esxcli system visorfs ramdisk list)

$ESXiRamdisks = $esxcli.system.visorfs.ramdisk.list.Invoke()

ForEach ($Ramdisk in $ESXiRamdisks) {

$RamdiskFree = [int]$Ramdisk.Free

$RamdiskUsed = 100 - $RamdiskFree

$RamdiskName = [string]$Ramdisk.RamdiskName

If ($RamdiskFree -le 10) {

        write-host $esxihost

Send-MailMessage -From $Sender -To $Receipient -SmtpServer $smtp -Subject "Ramdisk $RamdiskName on Host $ESXiHost at $RamdiskUsed%" -Body "Ramdisk $RamdiskName on Host $ESXiHost has exceeded 90% utilization, current value is $RamdiskUsed%" -Priority $Prioritystate

        }

}

}

#Disconnect vCenter Instance

Disconnect-VIServer -confirm:$false

/s/Harshvardhan Gupta