Esempio n. 1
0
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
}
Esempio n. 2
0
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
}