func findUnicorns() processes.PsList { entries := processes.Ps() unicorns := make(processes.PsList, 0, 2) for _, entry := range entries { if strings.Contains(entry.Command, "unicorn_rails") { unicorns = append(unicorns, entry) } } return unicorns }
func findNginxs() processes.PsList { entries := processes.Ps() nginxs := make(processes.PsList, 0, 2) for _, entry := range entries { if strings.Contains(entry.Command, "nginx") { nginxs = append(nginxs, entry) } } return nginxs }