    # File lib/phusion_passenger/admin_tools/server_instance.rb, line 109
            def self.list(options = {})
                    options = {
                            :clean_stale_or_corrupted => true
                    }.merge(options)
                    instances = []

                    Dir["#{AdminTools.tmpdir}/passenger.*"].each do |dir|
                            next if File.basename(dir) !~ /passenger\.#{DIR_STRUCTURE_MAJOR_VERSION}\.(\d+)\.(\d+)\Z/
                            minor = $1
                            next if minor.to_i > DIR_STRUCTURE_MINOR_VERSION

                            begin
                                    instances << ServerInstance.new(dir)
                            rescue StaleDirectoryError, CorruptedDirectoryError
                                    if options[:clean_stale_or_corrupted] &&
                                       File.stat(dir).mtime < current_time - STALE_TIME_THRESHOLD
                                            log_cleaning_action(dir)
                                            FileUtils.chmod_R(0700, dir) rescue nil
                                            FileUtils.rm_rf(dir)
                                    end
                            rescue UnsupportedGenerationStructureVersionError, GenerationsAbsentError
                                    # Do nothing.
                            end
                    end
                    return instances
            end