ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Final Call ... XenServer Boot Media

    IT Discussion
    10
    178
    17.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • BRRABillB
      BRRABill
      last edited by

      Ok, wait wait wait a second here. 🙂

      This all started because someone here said (I think it was @scottalanmiller ) that is was easy to send the logs from XS somewhere else. And it is. But they is still a bunch of local writing. Even though locations have changed in XS7, the concept is the same.

      So, let's take this in steps.

      In 6.5, the configuration was located in /var/lib/syslong.conf, as stated in that article.

      Finally, select "OK" and the stand-alone XenServer (or pool) will update its Syslog configuration, or more specifically, /var/lib/syslog.conf.  The reason for this is so Elastic Syslog can take over the normal duties of Syslog: forwarding messages to the Syslog aggregator accordingly.
      
      Certain logs will still continue to record Syslog on the host, so it may be desirable to edit /var/lib/syslog.conf and add comments to lines where a "-/var/log/some_filename" is specified as lines with "@x.x.x.x" dictate to forward to the Syslog aggregator.  As an example, I have marked the lines in bold to show where comments should be added to prevent further logging to the local disk:
      

      In XS7, the config file appears to be saved in /etc/rsyslog.d/xenserver.conf

      When local logging in on, it looks like this

      # Suppress duplicate messages and report "Last line repeated n times"
      $RepeatedMsgReduction on
      
      # Don't rate-limit messages - this isn't the right way to go about 
      # reducing log size!
      $IMUXSockRateLimitInterval 0
      $SystemLogRateLimitInterval 0
      
      # Ensure critical and higher level errors are logged synchronously.
      *.crit;mail.none;authpriv.none;cron.none		/var/log/crit.log
      
      # Log by facility.
      kern.*							-/var/log/kern.log
      daemon.*						-/var/log/daemon.log
      user.*							-/var/log/user.log
      
      # The authpriv file has restricted access.
      authpriv.*						-/var/log/secure
      
      # Log all the mail messages in one place.
      mail.*							-/var/log/maillog
      
      # Log cron stuff
      cron.*							-/var/log/cron
      
      # Save boot messages also to boot.log
      local7.*						/var/log/boot.log
      
      # Xapi rbac audit log echoes to syslog local6
      local6.*						-/var/log/audit.log
      
      # Xapi, xenopsd echo to syslog local5
      local5.*						-/var/log/xensource.log
      
      # V6d echo to syslog local4
      local4.*						-/var/log/v6d.log
      
      # xenstore access to syslog local3
      local3.info						-/var/log/xenstored-access.log
      
      # Storage Manager to syslog local2
      local2.*						-/var/log/SMlog
      
      # xcp-rrdd-plugins (info and above) to local0
      local0.info						-/var/log/xcp-rrdd-plugins.log
      
      # ignore default rules
      
      *.* 
      

      When remote logging is turned on the file looks like this, which you can see is almost the same, with the exception of the remote IP address added of the logging server.

      # Suppress duplicate messages and report "Last line repeated n times"
      $RepeatedMsgReduction on
      
      # Don't rate-limit messages - this isn't the right way to go about 
      # reducing log size!
      $IMUXSockRateLimitInterval 0
      $SystemLogRateLimitInterval 0
      
      # Ensure critical and higher level errors are logged synchronously.
      *.crit;mail.none;authpriv.none;cron.none		/var/log/crit.log
      
      # Log by facility.
      kern.*							-/var/log/kern.log
      daemon.*						-/var/log/daemon.log
      user.*							-/var/log/user.log
      
      # The authpriv file has restricted access.
      authpriv.*						-/var/log/secure
      
      # Log all the mail messages in one place.
      mail.*							-/var/log/maillog
      
      # Log cron stuff
      cron.*							-/var/log/cron
      
      # Save boot messages also to boot.log
      local7.*						/var/log/boot.log
      
      # Xapi rbac audit log echoes to syslog local6
      local6.*						-/var/log/audit.log
      
      # Xapi, xenopsd echo to syslog local5
      local5.*						-/var/log/xensource.log
      
      # V6d echo to syslog local4
      local4.*						-/var/log/v6d.log
      
      # xenstore access to syslog local3
      local3.info						-/var/log/xenstored-access.log
      
      # Storage Manager to syslog local2
      local2.*						-/var/log/SMlog
      
      # xcp-rrdd-plugins (info and above) to local0
      local0.info						-/var/log/xcp-rrdd-plugins.log
      
      # ignore default rules
      
      *.* @10.0.4.31
      *.* 
      
      scottalanmillerS 1 Reply Last reply Reply Quote 0
      • BRRABillB
        BRRABill
        last edited by

        So seeing this, what would you think the next logical step would be to accomplish what I want.

        And by association, what anyone running XS off USB would want?

        scottalanmillerS 1 Reply Last reply Reply Quote 0
        • BRRABillB
          BRRABill
          last edited by

          And also, is that a good idea in the grand scheme of things.

          1 Reply Last reply Reply Quote 0
          • DustinB3403D
            DustinB3403
            last edited by DustinB3403

            I would still assume based on what you've presented that you need to comment out the local storage folders on both XS6.5 and XS7 to disable logging locally.

            The *.* (at the very end) what purpose does that server?

            BRRABillB scottalanmillerS DanpD 3 Replies Last reply Reply Quote 2
            • BRRABillB
              BRRABill
              last edited by

              BTW, there was a post on the XenServer forums about running off of USB today, and this was the response (from a user with almost 6,000 posts there):

              "Its technically possible, but frowned upon due to SD cards usually not being good quality that can handle the amount of read/writes. There are sites/link on the Internet where others have done such a thing. Citrix will likely not be of assistance if you need there support, you would be totally on your own."

              FATeknollogeeF 1 Reply Last reply Reply Quote 0
              • BRRABillB
                BRRABill @DustinB3403
                last edited by

                @DustinB3403 said in Final Call ... XenServer Boot Media:

                I would still assume based on what you've presented that you need to comment out the local storage folders on both XS6.5 and XS7 to disable logging locally.

                The . (at the very end) what purpose does that server?

                No idea.

                And I wonder if we really NEED those logs.

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • BRRABillB
                  BRRABill
                  last edited by

                  I also took a look at the /var/log directory. There is a ton of stuff in there. It appears that XS7 is now archiving previous day logs. If that is the case, it might be OK on USB because it would always be writing to new areas, no?

                  
                  -rw------- 1 root root 11128337 Sep  6 11:00 xensource.log
                  -rw------- 1 root root  1439756 Sep  6 11:00 audit.log
                  -rw------- 1 root root   835573 Sep  6 11:00 SMlog
                  -rw------- 1 root root     7792 Sep  6 11:00 cron
                  -rw------- 1 root root    73125 Sep  6 11:00 daemon.log
                  -rw------- 1 root root    28967 Sep  6 10:56 xcp-rrdd-plugins.log
                  -rw------- 1 root root     4999 Sep  6 10:53 secure
                  -rw-r--r-- 1 root root 38273316 Sep  6 10:36 lastlog
                  -rw-rw-r-- 1 root utmp    38016 Sep  6 10:36 wtmp
                  drwxr-xr-x 2 root root     4096 Sep  6 04:02 xen
                  -rw------- 1 root root        0 Sep  6 04:02 xenstored-access.log
                  -rw-r--r-- 1 root root        0 Sep  6 04:02 boot.log
                  -rw-r--r-- 1 root root        0 Sep  6 04:02 interface-rename.log
                  -rw------- 1 root root        0 Sep  6 04:02 kern.log
                  -rw------- 1 root root        0 Sep  6 04:02 maillog
                  -rw------- 1 root root        0 Sep  6 04:02 messages
                  -rw------- 1 root root        0 Sep  6 04:02 spooler
                  -rw------- 1 root root        0 Sep  6 04:02 user.log
                  -rw------- 1 root root    28610 Sep  6 04:02 cron.1
                  -rw------- 1 root root   244847 Sep  6 04:02 daemon.log.1
                  -rw------- 1 root root      186 Sep  6 04:02 user.log.1
                  -rw------- 1 root root  4951616 Sep  6 04:01 audit.log.1
                  -rw------- 1 root root  2876101 Sep  6 04:01 SMlog.1
                  -rw------- 1 root root   100512 Sep  6 04:00 xcp-rrdd-plugins.log.1
                  -rw------- 1 root root 25827200 Sep  6 00:39 xensource.log.1
                  drwxr-xr-x 2 root root     4096 Sep  6 00:00 sa
                  -rw-r--r-- 1 root root        0 Sep  5 04:02 boot.log.1
                  -rw------- 1 root root        0 Sep  5 04:02 kern.log.1
                  -rw------- 1 root root        0 Sep  5 04:02 maillog.1
                  -rw------- 1 root root        0 Sep  5 04:02 messages.1
                  -rw------- 1 root root        0 Sep  5 04:02 secure.1
                  -rw------- 1 root root        0 Sep  5 04:02 spooler.1
                  -rw------- 1 root root        0 Sep  5 04:02 xenstored-access.log.1
                  -rw------- 1 root root     2440 Sep  5 04:02 cron.2.gz
                  -rw------- 1 root root     8110 Sep  5 04:02 daemon.log.2.gz
                  -rw-r--r-- 1 root root        0 Sep  5 04:02 interface-rename.log.1
                  -rw------- 1 root root      132 Sep  5 04:02 user.log.2.gz
                  -rw------- 1 root root   409473 Sep  5 04:01 audit.log.2.gz
                  -rw------- 1 root root   323003 Sep  5 04:01 SMlog.2.gz
                  -rw------- 1 root root     2189 Sep  5 04:00 xcp-rrdd-plugins.log.2.gz
                  -rw------- 1 root root  2112543 Sep  5 00:39 xensource.log.2.gz
                  -rw-r--r-- 1 root root       20 Sep  4 04:02 boot.log.2.gz
                  -rw------- 1 root root       20 Sep  4 04:02 kern.log.2.gz
                  -rw------- 1 root root       20 Sep  4 04:02 xenstored-access.log.2.gz
                  -rw------- 1 root root     2417 Sep  4 04:02 cron.3.gz
                  -rw------- 1 root root     7605 Sep  4 04:02 daemon.log.3.gz
                  -rw-r--r-- 1 root root       20 Sep  4 04:02 interface-rename.log.2.gz
                  -rw------- 1 root root       20 Sep  4 04:02 maillog.2.gz
                  -rw------- 1 root root       20 Sep  4 04:02 messages.2.gz
                  -rw------- 1 root root       20 Sep  4 04:02 secure.2.gz
                  -rw------- 1 root root       20 Sep  4 04:02 spooler.2.gz
                  -rw------- 1 root root      135 Sep  4 04:02 user.log.3.gz
                  -rw------- 1 root root   409148 Sep  4 04:01 audit.log.3.gz
                  -rw------- 1 root root   323042 Sep  4 04:01 SMlog.3.gz
                  -rw------- 1 root root     2192 Sep  4 04:00 xcp-rrdd-plugins.log.3.gz
                  -rw------- 1 root root  2112497 Sep  4 00:39 xensource.log.3.gz
                  -rw------- 1 root root       20 Sep  3 04:02 xenstored-access.log.3.gz
                  -rw-r--r-- 1 root root       20 Sep  3 04:02 boot.log.3.gz
                  -rw-r--r-- 1 root root       20 Sep  3 04:02 interface-rename.log.3.gz
                  -rw------- 1 root root       20 Sep  3 04:02 kern.log.3.gz
                  -rw------- 1 root root       20 Sep  3 04:02 maillog.3.gz
                  -rw------- 1 root root       20 Sep  3 04:02 messages.3.gz
                  -rw------- 1 root root       20 Sep  3 04:02 secure.3.gz
                  -rw------- 1 root root       20 Sep  3 04:02 spooler.3.gz
                  -rw------- 1 root root     2386 Sep  3 04:02 cron.4.gz
                  -rw------- 1 root root     7599 Sep  3 04:02 daemon.log.4.gz
                  -rw------- 1 root root      132 Sep  3 04:02 user.log.4.gz
                  -rw------- 1 root root   409287 Sep  3 04:01 audit.log.4.gz
                  -rw------- 1 root root   323073 Sep  3 04:01 SMlog.4.gz
                  -rw------- 1 root root     2195 Sep  3 03:59 xcp-rrdd-plugins.log.4.gz
                  -rw------- 1 root root  2113429 Sep  3 00:39 xensource.log.4.gz
                  -rw------- 1 root root      509 Sep  2 13:40 secure.4.gz
                  -rw-r--r-- 1 root root       20 Sep  2 04:02 boot.log.4.gz
                  -rw------- 1 root root       20 Sep  2 04:02 kern.log.4.gz
                  -rw------- 1 root root       20 Sep  2 04:02 maillog.4.gz
                  -rw------- 1 root root       20 Sep  2 04:02 messages.4.gz
                  -rw------- 1 root root       20 Sep  2 04:02 spooler.4.gz
                  -rw------- 1 root root       20 Sep  2 04:02 xenstored-access.log.4.gz
                  -rw------- 1 root root     2415 Sep  2 04:02 cron.5.gz
                  -rw------- 1 root root     7695 Sep  2 04:02 daemon.log.5.gz
                  -rw-r--r-- 1 root root       20 Sep  2 04:02 interface-rename.log.4.gz
                  -rw------- 1 root root      132 Sep  2 04:02 user.log.5.gz
                  -rw------- 1 root root   409466 Sep  2 04:01 audit.log.5.gz
                  -rw------- 1 root root   323045 Sep  2 04:01 SMlog.5.gz
                  -rw------- 1 root root     2184 Sep  2 03:59 xcp-rrdd-plugins.log.5.gz
                  -rw------- 1 root root  2113136 Sep  2 00:39 xensource.log.5.gz
                  -rw------- 1 root root      684 Sep  1 15:18 secure.5.gz
                  -rw------- 1 root root      128 Sep  1 15:18 kern.log.5.gz
                  -rw------- 1 root utmp      384 Sep  1 11:27 btmp
                  -rw------- 1 root root       20 Sep  1 04:02 xenstored-access.log.5.gz
                  -rw-r--r-- 1 root root       20 Sep  1 04:02 boot.log.5.gz
                  -rw-r--r-- 1 root root       20 Sep  1 04:02 interface-rename.log.5.gz
                  -rw------- 1 root root       20 Sep  1 04:02 maillog.5.gz
                  -rw------- 1 root root       20 Sep  1 04:02 messages.5.gz
                  -rw------- 1 root root       20 Sep  1 04:02 spooler.5.gz
                  -rw------- 1 root root     2406 Sep  1 04:02 cron.6.gz
                  -rw------- 1 root root     8042 Sep  1 04:02 daemon.log.6.gz
                  -rw------- 1 root root      132 Sep  1 04:02 user.log.6.gz
                  -rw------- 1 root root   409421 Sep  1 04:01 audit.log.6.gz
                  -rw------- 1 root root   323078 Sep  1 04:01 SMlog.6.gz
                  -rw------- 1 root root     2208 Sep  1 03:58 xcp-rrdd-plugins.log.6.gz
                  -rw------- 1 root root  2113430 Sep  1 00:39 xensource.log.6.gz
                  
                  1 Reply Last reply Reply Quote 0
                  • DashrenderD
                    Dashrender
                    last edited by

                    Yeah, until you run out of space. Space is the bigger issue than running out of read/write ares on the flash.

                    1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller @BRRABill
                      last edited by

                      @BRRABill said in Final Call ... XenServer Boot Media:

                      In 6.5, the configuration was located in /var/lib/syslong.conf, as stated in that article.

                      Actually the article said that it was NOT this for 6.5. The article never looked past 6.2 and didn't know where it had moved to.

                      1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @BRRABill
                        last edited by

                        @BRRABill said in Final Call ... XenServer Boot Media:

                        So seeing this, what would you think the next logical step would be to accomplish what I want.

                        And by association, what anyone running XS off USB would want?

                        Well, the current file (before you add the remote) tells all of those things to log to the local files. Then you add a line that tells it to, after writing to individual local files, also send copies to the remote syslog server.

                        So if you don't want it to write locally, you comment out each of the lines that tell it what to write locally. 🙂 It should be that simple. Adding the remote tells it to send the logs, but in no ways tells it NOT to change the local writing. Just comment out the local writing.

                        BRRABillB 1 Reply Last reply Reply Quote 0
                        • scottalanmillerS
                          scottalanmiller @DustinB3403
                          last edited by

                          @DustinB3403 said in Final Call ... XenServer Boot Media:

                          I would still assume based on what you've presented that you need to comment out the local storage folders on both XS6.5 and XS7 to disable logging locally.

                          The *.* (at the very end) what purpose does that server?

                          That last thing is some kind of catchall.

                          1 Reply Last reply Reply Quote 0
                          • DanpD
                            Danp @DustinB3403
                            last edited by

                            @DustinB3403 said in Final Call ... XenServer Boot Media:

                            The *.* (at the very end) what purpose does that server?

                            I would guess that this line is what is controlling the local logging. I would remove or comment it out to test this theory.

                            1 Reply Last reply Reply Quote 0
                            • BRRABillB
                              BRRABill @scottalanmiller
                              last edited by

                              @scottalanmiller said in Final Call ... XenServer Boot Media:

                              @BRRABill said in Final Call ... XenServer Boot Media:

                              So seeing this, what would you think the next logical step would be to accomplish what I want.

                              And by association, what anyone running XS off USB would want?

                              Well, the current file (before you add the remote) tells all of those things to log to the local files. Then you add a line that tells it to, after writing to individual local files, also send copies to the remote syslog server.

                              So if you don't want it to write locally, you comment out each of the lines that tell it what to write locally. 🙂 It should be that simple. Adding the remote tells it to send the logs, but in no ways tells it NOT to change the local writing. Just comment out the local writing.

                              Right, and that is what gets overwritten.

                              Let me try it and see what happens.

                              I'll report right back.

                              BRRABillB 1 Reply Last reply Reply Quote 0
                              • scottalanmillerS
                                scottalanmiller @BRRABill
                                last edited by

                                @BRRABill said in Final Call ... XenServer Boot Media:

                                @DustinB3403 said in Final Call ... XenServer Boot Media:

                                I would still assume based on what you've presented that you need to comment out the local storage folders on both XS6.5 and XS7 to disable logging locally.

                                The . (at the very end) what purpose does that server?

                                No idea.

                                And I wonder if we really NEED those logs.

                                It's just to disable defaults. It's meaningless given the remote command that you've added. Feel free to comment it out or delete it as you have overridden it already.

                                BRRABillB 1 Reply Last reply Reply Quote 0
                                • BRRABillB
                                  BRRABill @scottalanmiller
                                  last edited by

                                  @scottalanmiller said in Final Call ... XenServer Boot Media:

                                  @BRRABill said in Final Call ... XenServer Boot Media:

                                  @DustinB3403 said in Final Call ... XenServer Boot Media:

                                  I would still assume based on what you've presented that you need to comment out the local storage folders on both XS6.5 and XS7 to disable logging locally.

                                  The . (at the very end) what purpose does that server?

                                  No idea.

                                  And I wonder if we really NEED those logs.

                                  It's just to disable defaults. It's meaningless given the remote command that you've added. Feel free to comment it out or delete it as you have overridden it already.

                                  So, you don't think there are also things that might not get sent to the remote syslog server? I guess we could test that as well.

                                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                                  • BRRABillB
                                    BRRABill @BRRABill
                                    last edited by

                                    @BRRABill said in Final Call ... XenServer Boot Media:

                                    @scottalanmiller said in Final Call ... XenServer Boot Media:

                                    @BRRABill said in Final Call ... XenServer Boot Media:

                                    So seeing this, what would you think the next logical step would be to accomplish what I want.

                                    And by association, what anyone running XS off USB would want?

                                    Well, the current file (before you add the remote) tells all of those things to log to the local files. Then you add a line that tells it to, after writing to individual local files, also send copies to the remote syslog server.

                                    So if you don't want it to write locally, you comment out each of the lines that tell it what to write locally. 🙂 It should be that simple. Adding the remote tells it to send the logs, but in no ways tells it NOT to change the local writing. Just comment out the local writing.

                                    Right, and that is what gets overwritten.

                                    Let me try it and see what happens.

                                    I'll report right back.

                                    Wow, it kept the settings. That is promising!

                                    DustinB3403D 1 Reply Last reply Reply Quote 0
                                    • DustinB3403D
                                      DustinB3403 @BRRABill
                                      last edited by

                                      @BRRABill said in Final Call ... XenServer Boot Media:

                                      @BRRABill said in Final Call ... XenServer Boot Media:

                                      @scottalanmiller said in Final Call ... XenServer Boot Media:

                                      @BRRABill said in Final Call ... XenServer Boot Media:

                                      So seeing this, what would you think the next logical step would be to accomplish what I want.

                                      And by association, what anyone running XS off USB would want?

                                      Well, the current file (before you add the remote) tells all of those things to log to the local files. Then you add a line that tells it to, after writing to individual local files, also send copies to the remote syslog server.

                                      So if you don't want it to write locally, you comment out each of the lines that tell it what to write locally. 🙂 It should be that simple. Adding the remote tells it to send the logs, but in no ways tells it NOT to change the local writing. Just comment out the local writing.

                                      Right, and that is what gets overwritten.

                                      Let me try it and see what happens.

                                      I'll report right back.

                                      Wow, it kept the settings. That is promising!

                                      So show us your log config file. Was this on XS6.5 or XS7?

                                      BRRABillB 1 Reply Last reply Reply Quote 0
                                      • BRRABillB
                                        BRRABill @DustinB3403
                                        last edited by

                                        @DustinB3403 said in Final Call ... XenServer Boot Media:

                                        @BRRABill said in Final Call ... XenServer Boot Media:

                                        @BRRABill said in Final Call ... XenServer Boot Media:

                                        @scottalanmiller said in Final Call ... XenServer Boot Media:

                                        @BRRABill said in Final Call ... XenServer Boot Media:

                                        So seeing this, what would you think the next logical step would be to accomplish what I want.

                                        And by association, what anyone running XS off USB would want?

                                        Well, the current file (before you add the remote) tells all of those things to log to the local files. Then you add a line that tells it to, after writing to individual local files, also send copies to the remote syslog server.

                                        So if you don't want it to write locally, you comment out each of the lines that tell it what to write locally. 🙂 It should be that simple. Adding the remote tells it to send the logs, but in no ways tells it NOT to change the local writing. Just comment out the local writing.

                                        Right, and that is what gets overwritten.

                                        Let me try it and see what happens.

                                        I'll report right back.

                                        Wow, it kept the settings. That is promising!

                                        So show us your log config file. Was this on XS6.5 or XS7?

                                        On XS7.

                                        I'm keeping an eye on /var/log to see if anything writes there first.

                                        1 Reply Last reply Reply Quote 0
                                        • BRRABillB
                                          BRRABill
                                          last edited by

                                          Most of the files seem to have stopped.

                                          It's these files I am watching...

                                          
                                          -rw-r--r-- 1 root root 38273316 Sep  6 11:25 lastlog
                                          -rw-rw-r-- 1 root utmp    43776 Sep  6 11:25 wtmp
                                          -rw------- 1 root utmp      768 Sep  6 11:21 btmp
                                          drwxr-xr-x 2 root root     4096 Sep  6 11:20 blktap
                                          -rw-r--r-- 1 root root      792 Sep  6 11:16 ovs-xapi-sync.log
                                          -rw-r--r-- 1 root root     2628 Sep  6 11:15 ovs-ctl.log
                                          -rw-r--r-- 1 root root     1784 Sep  6 11:14 restoreeswitchcfg.log
                                          -rw-r--r-- 1 root root      348 Sep  6 11:14 interface-rename.log
                                          -rw-r--r-- 1 root root      128 Sep  6 11:14 xenstored.log
                                          -rw-r--r-- 1 root root    11212 Sep  6 11:14 boot.log
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • FATeknollogeeF
                                            FATeknollogee
                                            last edited by

                                            @BRRABill updates....updates....😃

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 8
                                            • 9
                                            • 4 / 9
                                            • First post
                                              Last post