Announcement Banner
UNSOLVED

smaahs

updated

13 years ago

S

smaahs

19 Posts

1

138394

June 14th, 2013 09:00

Clear Lifecycle Controller log by WSMAN command or script ?

Hai....

is it possible to do this remotely ?

I have seen that it is possible to export the LC log by a WSMAN script, but not to clear the log.

Or does it mean that the LC log is cleared when it is getting exported ?

Thanks !

 

Regards,

stephan.

  • smaahs

    19 Posts

    8818

    1

    Posted June 14th, 2013 09:00

    Thanks. A customer of mine - a hoster - asked me this. They offer R720 as dedicated servers for their own customers. And this means repurposing the machine from time to time - which means that they want to give a "clean" system. They complained, that they need to boot into LC and to do this manually, they want to automate it.

    May be lcwipe could be the right approach - we will discuss this....

    Regards & have a nice weekend,

    stephan.

  • 8818

    0

    Posted June 14th, 2013 09:00

    @Stephan

    Lifecycle log is meant to keep the lifecycle history of events and hence there is no wsman method to clear it. However it gets cleared with a system wipe which is designed to get the system retire or repurpose. The LCL does not get cleared on export.

    May I know the usecase (other than system retire or repurpose)  where you would like to clear it ?

  • mondeep

    30 Posts

    8818

    0

    Posted June 14th, 2013 09:00

    Hi Stephan,

    When you export the LC logs, it does NOT clear the LC logs. There is no option to delete the LC logs unless you execute the LCWipe method on the iDRAC. I would not recommend you to perform LCWipe since it will delete all config details as well along with the LCLogs.

    You can export the LC logs winrm command -

    Here ShareType=2 means CIFS and 0 would mean NFS. For NFS you can skip the Username and Password parameters.

    winrm i ExportLCLog http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/root/dcim/DCIM_LCService?SystemCreationClassName=DCIM
    _ComputerSystem+CreationClassName=DCIM_LCService+SystemName=DCIM:ComputerSystem+
    Name=DCIM:LCService -u:username -p:password -r:https://idracip/wsman -SkipCNChec
    k -SkipCACheck -encoding:utf-8 -a:basic @{IPAddress="shareip";ShareName="sharename";FileName="lclog1";ShareType="2";Username="UN";Password="PWD"}

    ExportLCLog_OUTPUT
        Job
            EndpointReference
                Address = http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anon
    ymous
                ReferenceParameters
                    ResourceURI = http://schemas.dell.com/wbem/wscim/1/cim-schema/2/
    DCIM_LifecycleJob
                    SelectorSet
                        Selector: InstanceID = JID_712710243878, __cimnamespace = ro
    ot/dcim
        ReturnValue = 4096

    You can check if it is properly exported using the job ID created-

    winrm g "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/DCIM_LifecycleJob?InstanceID=JID_712710243878+__cimnamespace=root/dcim" -u:usernam -p:password -r:https://10.94.195.162/wsman -encoding:utf-8 -a:basi
    c -SkipCNcheck -SkipCAcheck -SkipRevocationCheck
    DCIM_LifecycleJob
        ElapsedTimeSinceCompletion = 0
        InstanceID = JID_712710243878
        JobStartTime = NA
        JobStatus = Completed
        JobUntilTime = NA
        Message = LCL Export was successful
        MessageArguments = NA
        MessageID = LC022
        Name = LC Export
        PercentComplete = 100

    Let me know if this worked for you.

    Regards,

    Mondeep