AFAIK, localcli did not exist in esx 4.x . It was introduced in 5.0 onwards.
From the KB , localcli hardware ipmi sel clear command is introduced specifically in a releaseof 5.1 and 5.5 only. For 4.x following steps should solve the issue.
To clear the IPMI System Event.log file and reset the sensors:
- Open vCenter Server using vSphere Client.
- In the vCenter Server Inventory, select the ESXi/ESX host.
- Click the Hardware Status tab.
- Click System Event log under View.
- Click Reset EventLog. The red alert is removed from the System Event log.
- Click Reset Sensors to reset the host sensors.