Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 913905 Details for
Bug 1088619
"a stop job is running for Session 1 of user antonio"
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
My reboot script
pre-reboot (text/plain), 2.04 KB, created by
Tom Horsley
on 2014-07-01 19:34:28 UTC
(
hide
)
Description:
My reboot script
Filename:
MIME Type:
Creator:
Tom Horsley
Created:
2014-07-01 19:34:28 UTC
Size:
2.04 KB
patch
obsolete
>#!/usr/bin/perl -w ># ># Silly perl script to find all the process on the system that are not ># system processes and not current user processes and print commands to ># kill them all off. Hopefully this will get rid of systemd user daemons ># which would otherwise make a reboot wait forever. > ># While I'm at it, lets find all the NFS mounts on systems I can't ># ping and umount -l them so we won't wait forever to timeout on them either ># (it sure is nice that systemd is so flexible and scriptable that ># things like this aren't necessary :-). > ># dino:/tt/carbon /tt/carbon nfs > >use strict; > >my $my_uid = $<; > >my %nfs; >my $mp; >if (open($mp, '<', '/proc/mounts')) { > while (<$mp>) { > if (/^(\S+):\/\S+\s+(\/\S+)\s+nfs/) { > my $system = $1; > my $mountpoint = $2; > my $r = $nfs{$system}; > if (! defined($r)) { > $r = {}; > $nfs{$system} = $r; > } > $r->{$mountpoint} = 1; > } > } >} >my $s; >foreach $s (keys(%nfs)) { > my $ph; > if (open($ph, '-|', 'ping', '-c', '1', '-W', '1', '-q', $s)) { > my $dead = 0; > while (<$ph>) { > if (/100\% packet loss/) { > $dead = 1; > } > } > close($ph); > if ($dead) { > my $mnt = $nfs{$s}; > my $mp; > foreach $mp (keys(%{$mnt})) { > print "umount -l $mp\n"; > } > } > } >} > >my @procs; >my $pf; >opendir($pf, "/proc") || die "Cannot read /proc directory : $!\n"; >@procs = readdir($pf); >closedir($pf); > >my @deaders; > >my $p; >foreach $p (@procs) { > if ($p=~/^\d+$/) { > my @s = stat("/proc/$p"); > if (scalar(@s) >= 5) { > if (! (($s[4] < 1000) || ($s[4] == $my_uid))) { > push(@deaders, $p); > } > } > } >} > >foreach $p (sort { $a <=> $b } (@deaders)) { > print "kill -STOP $p 2>/dev/null\n"; >} >print "usleep 100000\n"; >foreach $p (sort { $a <=> $b } (@deaders)) { > print "kill -9 $p 2>/dev/null\n"; >} >print "usleep 100000\n"; >foreach $p (sort { $a <=> $b } (@deaders)) { > print "kill -CONT $p 2>/dev/null\n"; >} >print "usleep 100000\n"; >print "reboot\n";
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1088619
:
901913
|
908919
|
913905
|
922771
|
924220
|
957196
|
959207