3 Replies Latest reply on Mar 19, 2014 11:18 AM by LucD

    Is it possible to start vmsyslogd with PowerCLI?

    DZ1 Hot Shot



      I ran into an issue on some hosts where the syslog service is not running.  KB 2003127 helped me fix the issue, but I have to log on to the host to do it.


      I need to be able to run ps -Cuv | grep vmsyslogd and /usr/lib/vmware/vmsyslog/bin/vmsyslogd


      I'm aware of the ESXCli command to reload syslog, but that does not help if the service is not running.  I thought that there should be some way to Invoke some type of command, but I'm trying to do this without having to provide credentials.

        • 1. Re: Is it possible to start vmsyslogd with PowerCLI?
          LucD Guru
          vExpertCommunity WarriorsUser Moderators

          You should be able to do that through the Get-EsxCli cmdlet.

          $esxcli = Get-EsxCli -VMHost $esx

          $esxcli.system.syslog.reload()

          Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
          • 2. Re: Is it possible to start vmsyslogd with PowerCLI?
            DZ1 Hot Shot



            Thanks LucD, unfortunately the reload method will not do anything when the service is completely stopped.  I spent some time troubleshooting it before, and the reload method would fail because the syslog service - I guess I should say the syslog daemon -  itself was not running.  After the daemon was started, the reload method would work, but I would have to ssh to the host first to start it.  

            • 3. Re:
              LucD Guru
              vExpertUser ModeratorsCommunity Warriors

              But you run the 'syslogd' command in the ESXi through the plink.exe command.

              That way you should at least be able to automate it.

               

              There are many examples on how to use plink.exe available in this community.

              Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz