Executing 2nd command after server rebooted & related services started

hi friends
i am creating a PS script containg two lines:
the first line executes dcpromo /unattend:c:\answerfile.txt to create a new domain controller
the second line will disable domain password complexity which is: 
set-executionPolicy -identity mydomain.lab -complexityenabled $false -minimumpasslength 5
the problem is i need after first line of the script, executed, server be rebooted & the 2nd line 
be executed after server rebooted & whey AD services started, this script continue to run the next line.
is it ossible in powershell?
thanks in advanced

You won't be able to do that in the same script.
You can use a second script that waits for the AD services to start, and then sets the password policies and run that script after the restart using the RunServicesOnce key:
https://support.microsoft.com/kb/179365?wa=wsignin1.0
Use the first script to set that key and then do the restart after the DC promo is finished.
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
hi again. thanks
in addition i found that the powershell workflow is better way to that
regards

Similar Messages

  • Oracle 10G Db Starts-up After Server Reboot, BUT Goes DOWN After Some Time

    Hi All,
    I am really puzzled over this one. I have couple of servers running DB on them and I have used scripts to auto-enable them when server(s) reboot.
    But there is one server where I see this funny behavior.
    The DB comes-up after server reboot.
    I can verify that in the startup logs and some more logs that I created.
    I can see that LISTENER is able to communicate also.
    But after a while, the DB shuts-down....!!
    I have checked all the places I could. I have also tried to see the difference between this server and others (I did not install this one), but can not see any difference.
    Is there anyway to find out (log) what is shutting down the DB??
    Any help will be much appreciated as I am at my wits end.
    Following is snap-shot from my logs:
    Fri Mar 16 20:42:29 EDT 2007
    Running dbstart.
    Done with starting all, let's check status...
    Fri Mar 16 20:42:42 EDT 2007
    LSNRCTL for Solaris: Version 10.2.0.1.0 - Production on 16-MAR-2007 20:42:42
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Solaris: Version 10.2.0.1.0 - Production
    Start Date 16-MAR-2007 00:46:56
    Uptime 0 days 19 hr. 55 min. 46 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /oracle/product/10.2.0/Db_1/network/admin/listener.ora
    Listener Log File /oracle/product/10.2.0/Db_1/network/log/listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.103.253.50)(PORT=1521)))
    Services Summary...
    Service "orcl" has 2 instance(s).
    Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orcl_XPT" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully
    Current Status:
    # date
    Fri Mar 16 21:30:40 EDT 2007
    # su - oracle -c "lsnrctl status"
    Sun Microsystems Inc. SunOS 5.10 Generic January 2005
    LSNRCTL for Solaris: Version 10.2.0.1.0 - Production on 16-MAR-2007 21:30:53
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    Solaris Error: 146: Connection refused
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.103.253.50)(PORT=1521)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    Solaris Error: 146: Connection refused

    I was just looking at that.. Thanks for the tip.
    Following is what I see. But not sure what does it tell me?? Please help......
    From alert_orcl.log:
    <snip>
    db_recovery_file_dest_size of 2048 MB is 0.00% used. This is a
    user-specified limit on the amount of space that will be used by this
    database for recovery-related files, and does not reflect the amount of
    space available in the underlying filesystem or ASM diskgroup.
    Fri Mar 16 20:42:41 2007
    Errors in file /oracle/product/10.2.0/Db_1/admin/orcl/udump/orcl_ora_7700.trc:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-12663: Services required by client not available on the server
    ORA-36961: Oracle OLAP is not available.
    ORA-06512: at "SYS.OLAPIHISTORYRETENTION", line 1
    ORA-06512: at line 15
    Fri Mar 16 20:42:42 2007
    Completed: ALTER DATABASE OPEN
    From /oracle/product/10.2.0/Db_1/admin/orcl/udump/orcl_ora_7700.trc
    # cat /oracle/product/10.2.0/Db_1/admin/orcl/udump/orcl_ora_7700.trc
    /oracle/product/10.2.0/Db_1/admin/orcl/udump/orcl_ora_7700.trc
    Oracle Database 10g Release 10.2.0.1.0 - 64bit Production
    ORACLE_HOME = /oracle/product/10.2.0/Db_1
    System name: SunOS
    Node name: gcars0j6
    Release: 5.10
    Version: Generic_118833-24
    Machine: sun4u
    Instance name: orcl
    Redo thread mounted by this instance: 1
    Oracle process number: 15
    Unix process pid: 7700, image: oracle@gcars0j6 (TNS V1-V3)
    *** SERVICE NAME:() 2007-03-16 20:42:37.548
    *** SESSION ID:(159.3) 2007-03-16 20:42:37.548
    Thread 1 checkpoint: logseq 255, block 2, scn 8602014
    cache-low rba: logseq 255, block 3
    on-disk rba: logseq 255, block 767, scn 8602399
    start recovery at logseq 255, block 3, scn 0
    ----- Redo read statistics for thread 1 -----
    Read rate (ASYNC): 382Kb in 0.16s => 2.33 Mb/sec
    Total physical reads: 4096Kb
    Longest record: 3Kb, moves: 0/1066 (0%)
    Change moves: 1/8 (12%), moved: 0Mb
    Longest LWN: 308Kb, moves: 0/29 (0%), moved: 0Mb
    Last redo scn: 0x0000.0083431e (8602398)
    ----- Recovery Hash Table Statistics ---------
    Hash table buckets = 32768
    Longest hash chain = 1
    Average hash chain = 149/149 = 1.0
    Max compares per lookup = 1
    Avg compares per lookup = 1925/2083 = 0.9
    *** 2007-03-16 20:42:37.702
    KCRA: start recovery claims for 149 data blocks
    *** 2007-03-16 20:42:37.705
    KCRA: blocks processed = 149/149, claimed = 149, eliminated = 0
    *** 2007-03-16 20:42:37.706
    Recovery of Online Redo Log: Thread 1 Group 2 Seq 255 Reading mem 0
    ----- Recovery Hash Table Statistics ---------
    Hash table buckets = 32768
    Longest hash chain = 1
    Average hash chain = 149/149 = 1.0
    Max compares per lookup = 1
    Avg compares per lookup = 2054/2074 = 1.0
    Error in executing triggers on database startup
    *** 2007-03-16 20:42:41.963
    ksedmp: internal or fatal error
    ORA-00604: error occurred at recursive SQL level 1
    ORA-12663: Services required by client not available on the server
    ORA-36961: Oracle OLAP is not available.
    ORA-06512: at "SYS.OLAPIHISTORYRETENTION", line 1
    ORA-06512: at line 15

  • Call park music on hold reverts to default after server reboot

    Hello,
    We are noticing that if you define Music on hold for the Park service, the call park music on hold reverts to default sound after server reboot. (all systems we've tested do this)
    Anyone using park music on hold that can verify one way or the other?
    Thanks, 
    +Say thanks and observe basic forum courtesy:
    +If this post answered your question, Mark As Answer
    +If this post was helpful, Vote as Helpful
    windowspbx blog: my thots/howtos
    see/submit Lync suggestions here: simple and public

    We have tested it and we have the same result. Hope the next update will resolve this problem.

  • Unable to run Fortune sample after server reboot

    Hi,
    I have installed Application server 6.5 on Solaris 9. After installation, I am able to run the fortune sample to verify success installation.
    However, after server reboot, I am not able to drun the fortune sample again. Access log on Iplanet web server shows error code 504. Can anyone help me?
    Thanks.

    The above steps resolved the problem - This is posted in case someone else suffers from the same issue.

  • Databases are not coming up after server reboot(sun solaris).

    Hi
    OS - Sun OS 5.10 local zone. RDBMS version - 11.2.0.3
    Databases are not coming up after server reboot.
    We have verified the below points.
    Cat/etc/init.d/oracle
    $ORACLE_HOME/bin/oradism file permissions are 4550.
    lock_sga is parameter set to false.
    cat /var/opt/oracle/oratab entries are set to Y
    Still Databases are not coming up after server reboot.
    Please advise.

    Hi,
    Can you post further information from alert log. Doesn't coming up, means you needs to share the information some thing about your environmente settings about kernel parameter and init$ORACLE_SID parameters details.
    That would be easy for others to look into it further to analyze things.
    - Pavan Kumar N

  • Windows Image Deployment - WinPE - Execute Command After Server Image Deployment but Before WinPE Reboot

    Simplified version: Execute command in WinPE after server image deployment but before WinPE reboots.
    I have a custom ISO with a boot.wim and install.wim for deploying Windows Server to our environment. Our environment does not allow DHCP and we have no static IPs available at build time so this will all be done with no internet connection during all phases
    of deployment.
    We have a custom HTA form that generates an XML file based on user input and stores it on the RAMDisk during WinPE. How can we move this XML file from the RAMDisk to the deployed Windows Server image?
    Thanks in advance, Tim

    I believe you should be able to do this during the offlineServicing configuration pass.  You would just need to add into your answer file a command or script to copy from the XML file over to the newly created C:\ drive.  
    I don't have System Image Manager installed on the computer I'm using but if I recall there is a spot during the offlineServicing pass to execute custom commands. You would just add your script path there, the WinPE system drive letter is
    X:\ , and I think the target drive letter Windows is installed to might change depending on how many devices you have hooked up so do a test install and hit SHIFT-F10 , from there you can run diskpart > list volume to see where the new Windows
    install is located. 
    Another alternative could be using a USB drive as your install media, then you can run a script during offlineServicing to copy that XML over to the USB drive.

  • I executed stopsap command and I rebooted server.Now I can not use startsap

    I executed stopsap command and rebooted server.Now I can not use startsap
    I use Oracle Database
    System gives me message below:
    Checking ORC Database
    ABAP database is not avalable via R3Trans
    ABAP Database ORC must be started on remote server
    How can I solve this problem?
    Thanks.

    Hello Cemil,
    Could you save the output that the script startsap returns to a file and upload it somewhere. Also the startsap logs, the location of which you could see when you run the startsap script. You could use http://www.rapidshare.com/ to upload the files.
    Regards,
    Ventsi Tsachev
    Technology Development Support (J2EE Engine)
    SAP Labs, Palo Alto, Ca (USA)

  • Messages - no user is allowed to login after server reboot

    Hello all together,
    I had to reboot a XServe with Mac OS X 10.8.3 and Server App 2.2.1 installed using the command line because I couldn't connect via ARD anymore at that time and the users couldn't login at all with their OD accounts.
    After the reboot no user was able to login to the messages server which wasn't any problem before this reboot. "User ID or password is wrong". The messages service in server.app is running. I restarted it twice without any advance. The passwordservice server log shows up all requests and the passwordservice error log has no entries at all. I couldn't find any related entries in any of the logs I searched in, especially not in the system.log.
    The users trying to login are local network users which are allowed to use this service and are all members of one group which is also allowed to use this service.
    If I turn the messages service off and try it again I get the same error. Therefor I can't even say if the service is definitely running but port 5223 is opened.
    Any suggestions?
    I really appreciate your help!
    Kind regards,
    ragob66

    Hello,
    for information purposes:
    A second server reboot resolves this issue!
    Thanks!
    Kind regards,
    ragob66

  • [Solved] "slim: failed to execute login command" after awesomewm updat

    Hi,
    i updated some weeks ago via pacman -Syu, where also awesome wm was updated from 3.4.* to 3.5.* so I updated my rc.lua as it is told on their wiki, but i cant login with my rc.lua anymore i got the failed to execute login command error from slime. If i use the shipped efault rc.lua it works fine, can someone help me to figure out whats wrong with my rc.lua?
    -- Standard awesome library
    local gears = require("gears")
    local awful = require("awful")
    awful.rules = require("awful.rules")
    require("awful.autofocus")
    -- Widget and layout library
    local wibox = require("wibox")
    -- Theme handling library
    local beautiful = require("beautiful")
    -- Notification library
    local naughty = require("naughty")
    local menubar = require("menubar")
    local vicious = require("vicious")
    function fullscreens(c)
    awful.client.floating.toggle(c)
    if awful.client.floating.get(c) then
    local clientX = screen[1].workarea.x
    local clientY = screen[1].workarea.y
    local clientWidth = 0
    -- look at http://www.rpm.org/api/4.4.2.2/llimits_8h-source.html
    local clientHeight = 2147483640
    for s = 1, screen.count() do
    clientHeight = math.min(clientHeight, screen[s].workarea.height)
    clientWidth = clientWidth + screen[s].workarea.width
    end
    local t = c:geometry({x = clientX, y = clientY, width = clientWidth, height = clientHeight})
    else
    --apply the rules to this client so he can return to the right tag if there is a rule for that.
    awful.rules.apply(c)
    end
    -- focus our client
    client.focus = c
    end
    -- {{{ Error handling
    -- Check if awesome encountered an error during startup and fell back to
    -- another config (This code will only ever execute for the fallback config)
    if awesome.startup_errors then
    naughty.notify({ preset = naughty.config.presets.critical,
    title = "Oops, there were errors during startup!",
    text = awesome.startup_errors })
    end
    -- Handle runtime errors after startup
    do
    local in_error = false
    awesome.connect_signal("debug::error", function (err)
    -- Make sure we don't go into an endless error loop
    if in_error then return end
    in_error = true
    naughty.notify({ preset = naughty.config.presets.critical,
    title = "Oops, an error happened!",
    text = err })
    in_error = false
    end)
    end
    -- {{{ Variable definitions
    -- Themes define colours, icons, and wallpapers
    -- beautiful.init("/home/kili/Repositories/awesome-themes/arch/theme.lua")
    beautiful.init("/usr/share/awesome/themes/default/theme.lua")
    -- This is used later as the default terminal and editor to run.
    terminal = "urxvt"
    editor = os.getenv("EDITOR") or "nano"
    editor_cmd = terminal .. " -e " .. editor
    -- Default modkey.
    -- Usually, Mod4 is the key with a logo between Control and Alt.
    -- If you do not like this or do not have such a key,
    -- I suggest you to remap Mod4 to another key using xmodmap or other tools.
    -- However, you can use another modifier like Mod1, but it may interact with others.
    modkey = "Mod4"
    -- Table of layouts to cover with awful.layout.inc, order matters.
    layouts =
    awful.layout.suit.tile,
    awful.layout.suit.tile.left,
    awful.layout.suit.tile.bottom,
    awful.layout.suit.tile.top,
    awful.layout.suit.floating,
    awful.layout.suit.fair,
    awful.layout.suit.fair.horizontal,
    awful.layout.suit.spiral,
    awful.layout.suit.spiral.dwindle,
    awful.layout.suit.max,
    awful.layout.suit.max.fullscreen,
    awful.layout.suit.magnifier
    -- {{{ Tags
    -- Define a tag table which hold all screen tags.
    tags = {}
    for s = 1, screen.count() do
    -- Each screen has its own tag table.
    tags[s] = awful.tag({ 1, 2, 3, 4, 5}, s, layouts[1])
    end
    -- {{{ Menu
    -- Create a laucher widget and a main menu
    myawesomemenu = {
    { "manual", terminal .. " -e man awesome" },
    { "edit config", editor_cmd .. " " .. awesome.conffile },
    { "restart", awesome.restart },
    { "quit", awesome.quit }
    mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
    { "open terminal", terminal }
    mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = mymainmenu })
    -- {{{ Wibox
    -- Create a textclock widget
    batwidget = wibox.widget.textbox()
    vicious.register(batwidget, vicious.widgets.bat,
    function(widget,args)
    local formatstring = " Bat: "..args[1]..args[2] .."%".. " "..args[3] .. " "
    if args[2] <= 25 and args[1] == "-" then
    return "<span color=\"red\">".. formatstring .. "</span>"
    end
    return formatstring
    end, 60, "BAT0")
    netwidgetETH = wibox.widget.textbox()
    netwidgetWIFI = wibox.widget.textbox()
    vicious.register(netwidgetETH, vicious.widgets.net, ' eth0:<span color="#CC9393">${eth0 down_kb}</span> <span color="#7F9F7F">${eth0 up_kb}</span>', 3)
    vicious.register(netwidgetWIFI, vicious.widgets.net,' wlan0:<span color="#CC9393">${wlan0 down_kb}</span> <span color="#7F9F7F">${wlan0 up_kb}</span>', 3)
    menubar.utils.terminal = terminal
    mytextclock = awful.widget.textclock()--{ align = "right" })
    -- Create a systray
    mysystray = wibox.widget.systray()
    -- Create a wibox for each screen and add it
    mywibox = {}
    mypromptbox = {}
    mylayoutbox = {}
    mytaglist = {}
    mytaglist.buttons = awful.util.table.join(
    awful.button({ }, 1, awful.tag.viewonly),
    awful.button({ modkey }, 1, awful.client.movetotag),
    awful.button({ }, 3, awful.tag.viewtoggle),
    awful.button({ modkey }, 3, awful.client.toggletag),
    awful.button({ }, 4, function(t) awful.tag.viewnext(aweful.tag.getscreen(t)) end),
    awful.button({ }, 5, function(t) awful.tag.viewprev(aweful.tag.getscreen(t)) end)
    mytasklist = {}
    mytasklist.buttons = awful.util.table.join(
    awful.button({ }, 1, function (c)
    if c == client.focus then
    c.minimized = true
    else
    c.minimized = false
    if not c:isvisible() then
    awful.tag.viewonly(c:tags()[1])
    end
    -- This will also un-minimize
    -- the client, if needed
    client.focus = c
    c:raise()
    end
    end),
    awful.button({ }, 3, function ()
    if instance then
    instance:hide()
    instance = nil
    else
    instance = awful.menu.clients({ width=250 })
    end
    end),
    awful.button({ }, 4, function ()
    awful.client.focus.byidx(1)
    if client.focus then client.focus:raise() end
    end),
    awful.button({ }, 5, function ()
    awful.client.focus.byidx(-1)
    if client.focus then client.focus:raise() end
    end))
    for s = 1, screen.count() do
    -- Create a promptbox for each screen
    mypromptbox[s] = awful.widget.prompt()--{ layout = awful.widget.layout.horizontal.leftright })
    -- Create an imagebox widget which will contains an icon indicating which layout we're using.
    -- We need one layoutbox per screen.
    mylayoutbox[s] = awful.widget.layoutbox(s)
    mylayoutbox[s]:buttons(awful.util.table.join(
    awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
    awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
    awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
    awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
    -- Create a taglist widget
    mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
    -- Create a tasklist widget
    mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
    -- Create the wibox
    mywibox[s] = awful.wibox({ position = "top", screen = s })
    -- Widgets that are aligned to the left
    local left_layout = wibox.layout.fixed.horizontal()
    left_layout:add(mylauncher)
    left_layout:add(mytaglist[s])
    left_layout:add(mypromptbox[s])
    -- Widgets that are aligned to the right
    local right_layout = wibox.layout.fixed.horizontal()
    if s == 1 then right_layout:add(wibox.widget.systray()) end
    right_layout:add(netwidgetWIFI)
    right_layout:add(netwidgetETH)
    right_layout:add(batwidget)
    right_layout:add(mytextclock)
    right_layout:add(mylayoutbox[s])
    -- Now bring it all together (with the tasklist in the middle)
    local layout = wibox.layout.align.horizontal()
    layout:set_left(left_layout)
    layout:set_middle(mytasklist[s])
    layout:set_right(right_layout)
    mywibox[s]:set_widget(layout)
    -- Add widgets to the wibox - order matters
    --mywibox[s].widgets = {
    -- mylauncher,
    -- mytaglist[s],
    -- mypromptbox[s],
    --layout = awful.widget.layout.horizontal.leftright
    -- mylayoutbox[s],
    -- mytextclock,
    -- batwidget,
    -- netwidgetETH,
    -- netwidgetWIFI,
    -- s == 1 and mysystray or nil,
    -- mytasklist[s],
    -- layout = awful.widget.layout.horizontal.rightleft
    end
    -- {{{ Mouse bindings
    root.buttons(awful.util.table.join(
    awful.button({ }, 3, function () mymainmenu:toggle() end),
    awful.button({ }, 4, awful.tag.viewnext),
    awful.button({ }, 5, awful.tag.viewprev)
    -- {{{ Key bindings
    globalkeys = awful.util.table.join(
    awful.key({ modkey, }, "Left", awful.tag.viewprev ),
    awful.key({ modkey, }, "Right", awful.tag.viewnext ),
    awful.key({ modkey, }, "Escape", awful.tag.history.restore),
    awful.key({ modkey, }, "j",
    function ()
    awful.client.focus.byidx( 1)
    if client.focus then client.focus:raise() end
    end),
    awful.key({ modkey, }, "k",
    function ()
    awful.client.focus.byidx(-1)
    if client.focus then client.focus:raise() end
    end),
    awful.key({ modkey, }, "w", function () mymainmenu:show() end),
    -- Layout manipulation
    awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
    awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
    awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
    awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
    awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
    awful.key({ modkey, }, "Tab",
    function ()
    awful.client.focus.history.previous()
    if client.focus then
    client.focus:raise()
    end
    end),
    -- Standard program
    awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
    awful.key({ modkey, "Control" }, "r", awesome.restart),
    awful.key({ modkey, "Shift" }, "q", awesome.quit),
    awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
    awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
    awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
    awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
    awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
    awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
    awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
    awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
    awful.key({ modkey, "Control" }, "n", awful.client.restore),
    -- Prompt
    awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
    awful.key({ modkey }, "x",
    function ()
    awful.prompt.run({ prompt = "Run Lua code: " },
    mypromptbox[mouse.screen].widget,
    awful.util.eval, nil,
    awful.util.getdir("cache") .. "/history_eval")
    end),
    -- Multimedia
    awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer -q sset Master 2dB-") end),
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer -q sset Master 2dB+") end),
    awful.key({ }, "XF86AudioNext",function () awful.util.spawn( "mocp -f" ) end),
    awful.key({ }, "XF86AudioPrev",function () awful.util.spawn( "mocp -r" ) end),
    awful.key({ }, "XF86AudioPlay",function () awful.util.spawn( "mocp -G" ) end),
    awful.key({ }, "Print", function () awful.util.spawn("ksnapshot") end),
    awful.key({ }, "", function () awful.util.spawn("slimlock") end)
    clientkeys = awful.util.table.join(
    awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
    awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
    awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
    awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
    awful.key({ modkey, }, "o", awful.client.movetoscreen ),
    -- awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
    awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
    awful.key({ modkey, }, "n",
    function (c)
    -- The client currently has the input focus, so it cannot be
    -- minimized, since minimized clients can't have the focus.
    c.minimized = true
    end),
    awful.key({ modkey, }, "m",
    function (c)
    c.maximized_horizontal = not c.maximized_horizontal
    c.maximized_vertical = not c.maximized_vertical
    end),
    awful.key({ modkey, "Shift" }, "f", fullscreens)
    -- Compute the maximum number of digit we need, limited to 9
    keynumber = 0
    for s = 1, screen.count() do
    keynumber = math.min(9, math.max(#tags[s], keynumber))
    end
    -- Bind all key numbers to tags.
    -- Be careful: we use keycodes to make it works on any keyboard layout.
    -- This should map on the top row of your keyboard, usually 1 to 9.
    for i = 1, keynumber do
    globalkeys = awful.util.table.join(globalkeys,
    awful.key({ modkey }, "#" .. i + 9,
    function ()
    local screen = mouse.screen
    if tags[screen][i] then
    awful.tag.viewonly(tags[screen][i])
    end
    end),
    awful.key({ modkey, "Control" }, "#" .. i + 9,
    function ()
    local screen = mouse.screen
    if tags[screen][i] then
    awful.tag.viewtoggle(tags[screen][i])
    end
    end),
    awful.key({ modkey, "Shift" }, "#" .. i + 9,
    function ()
    if client.focus and tags[client.focus.screen][i] then
    awful.client.movetotag(tags[client.focus.screen][i])
    end
    end),
    awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
    function ()
    if client.focus and tags[client.focus.screen][i] then
    awful.client.toggletag(tags[client.focus.screen][i])
    end
    end))
    end
    clientbuttons = awful.util.table.join(
    awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
    awful.button({ modkey }, 1, awful.mouse.client.move),
    awful.button({ modkey }, 3, awful.mouse.client.resize))
    -- Set keys
    root.keys(globalkeys)
    -- Set Firefox to always map on tags number 2 of screen 1.
    -- { rule = { class = "Firefox" },
    -- properties = { tag = tags[1][2] } },
    -- {{{ Rules
    if screen.count() > 1 then
    awful.rules.rules = {
    -- All clients will match this rule.
    { rule = { },
    properties = { border_width = beautiful.border_width,
    -- border_color = beautiful.border_normal,
    focus = true,
    keys = clientkeys,
    buttons = clientbuttons } },
    { rule = { class = "MPlayer" },
    properties = { floating = true } },
    { rule = { class = "gimp" },
    properties = { floating = true } },
    { rule = { class = "Xdialog" },
    properties = { floating = true } },
    { rule = { class = "Firefox" },
    properties = { tag = tags[1][1] } },
    { rule = { name = "Thunderbird" },
    properties = { tag = tags[1][2] } },
    { rule = { instance = "plugin-container" },
    properties = { floating = true } },
    { rule = { class = "Luakit" },
    properties = { floating = true } }
    else
    awful.rules.rules = {
    -- All clients will match this rule.
    { rule = { },
    properties = { border_width = beautiful.border_width,
    -- border_color = beautiful.border_normal,
    focus = true,
    keys = clientkeys,
    buttons = clientbuttons } },
    { rule = { class = "MPlayer" },
    properties = { floating = true } },
    { rule = { class = "gimp" },
    properties = { floating = true } },
    { rule = { class = "Firefox" },
    properties = { tag = tags[1][2] } },
    { rule = { name = "Thunderbird" },
    properties = { tag = tags[1][3] } },
    { rule = { instance = "plugin-container" },
    properties = { floating = true, fullscreen = true } },
    { rule = { class = "Dolphin" },
    properties = { floating = false, fullscreen = false, tag = tags[1][4] } },
    { rule = { class = "Luakit" },
    properties = { floating = true } },
    { rule = { class = "Pidgin" },
    properties = { tag = tags[1][5] } }
    end
    -- {{{ Signals
    -- Signal function to execute when a new client appears.
    client.connect_signal("manage", function (c, startup)
    -- Add a titlebar
    -- awful.titlebar.add(c, { modkey = modkey })
    -- Enable sloppy focus
    c:connect_signal("mouse::enter", function(c)
    if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
    and awful.client.focus.filter(c) then
    client.focus = c
    end
    end)
    if not startup then
    -- Set the windows at the slave,
    -- i.e. put it at the end of others instead of setting it master.
    -- awful.client.setslave(c)
    -- Put windows in a smart way, only if they does not set an initial position.
    if not c.size_hints.user_position and not c.size_hints.program_position then
    awful.placement.no_overlap(c)
    awful.placement.no_offscreen(c)
    end
    end
    local titlebars_enabled = false
    if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
    -- Widgets that are aligned to the left
    local left_layout = wibox.layout.fixed.horizontal()
    left_layout:add(awful.titlebar.widget.iconwidget(c))
    -- Widgets that are aligned to the right
    local right_layout = wibox.layout.fixed.horizontal()
    right_layout:add(awful.titlebar.widget.floatingbutton(c))
    right_layout:add(awful.titlebar.widget.maximizedbutton(c))
    right_layout:add(awful.titlebar.widget.stickybutton(c))
    right_layout:add(awful.titlebar.widget.ontopbutton(c))
    right_layout:add(awful.titlebar.widget.closebutton(c))
    -- The title goes in the middle
    local title = awful.titlebar.widget.titlewidget(c)
    title:buttons(awful.util.table.join(
    awful.button({ }, 1, function()
    client.focus = c
    c:raise()
    awful.mouse.client.move(c)
    end),
    awful.button({ }, 3, function()
    client.focus = c
    c:raise()
    awful.mouse.client.resize(c)
    end)
    -- Now bring it all together
    local layout = wibox.layout.align.horizontal()
    layout:set_left(left_layout)
    layout:set_right(right_layout)
    layout:set_middle(title)
    awful.titlebar(c):set_widget(layout)
    end
    end)
    client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
    client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
    Here is also my slime config and my initrc
    ls -lisa .xinitrc
    3276814 4 -rwxr-xr-x ...
    #!/bin/sh
    xrdb -merge ~/.Xresources
    wicd-client --tray &
    exec awesome #>> ~/.cache/awesome/stdout 2>> ~/.cache/awesome/stderr
    # Path, X server and arguments (if needed)
    # Note: -xauth $authfile is automatically appended
    default_path /bin:/usr/bin:/usr/local/bin
    default_xserver /usr/bin/X
    xserver_arguments -nolisten tcp vt07
    # Commands for halt, login, etc.
    halt_cmd /sbin/shutdown -h now
    reboot_cmd /sbin/shutdown -r now
    console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
    #suspend_cmd /usr/sbin/suspend
    # Full path to the xauth binary
    xauth_path /usr/bin/xauth
    # Xauth file for server
    authfile /var/run/slim.auth
    # Activate numlock when slim starts. Valid values: on|off
    numlock on
    # Hide the mouse cursor (note: does not work with some WMs).
    # Valid values: true|false
    # hidecursor false
    # This command is executed after a succesful login.
    # you can place the %session and %theme variables
    # to handle launching of specific commands in .xinitrc
    # depending of chosen session and slim theme
    # NOTE: if your system does not have bash you need
    # to adjust the command according to your preferred shell,
    # i.e. for freebsd use:
    # login_cmd exec /bin/sh - ~/.xinitrc %session
    login_cmd exec /bin/bash -login ~/.xinitrc %session
    # Commands executed when starting and exiting a session.
    # They can be used for registering a X11 session with
    # sessreg. You can use the %user variable
    # sessionstart_cmd some command
    # sessionstop_cmd some command
    # Start in daemon mode. Valid values: yes | no
    # Note that this can be overriden by the command line
    # options "-d" and "-nodaemon"
    # daemon yes
    # Available sessions (first one is the default).
    # The current chosen session name is replaced in the login_cmd
    # above, so your login command can handle different sessions.
    # see the xinitrc.sample file shipped with slim sources
    sessions awesome,xfce4,icewm-session,wmaker,blackbox
    # Executed when pressing F11 (requires imagemagick)
    screenshot_cmd import -window root /slim.png
    # welcome message. Available variables: %host, %domain
    welcome_msg Welcome to %host
    # Session message. Prepended to the session name when pressing F1
    # session_msg Session:
    # shutdown / reboot messages
    shutdown_msg The system is halting...
    reboot_msg The system is rebooting...
    # default user, leave blank or remove this line
    # for avoid pre-loading the username.
    default_user kili
    # Focus the password field on start when default_user is set
    # Set to "yes" to enable this feature
    focus_password yes
    # Automatically login the default user (without entering
    # the password. Set to "yes" to enable this feature
    #auto_login no
    # current theme, use comma separated list to specify a set to
    # randomly choose from
    current_theme archlinux-simplyblack
    # Lock file
    lockfile /var/lock/slim.lock
    # Log file
    logfile /var/log/slim.log
    Thanks in advance!
    Edit:
    Besides a lot of other errors the problem was the systray. It was created 2 times, now login works again. I figured that out via enabling logging for awesome in the xinitrc again.
    Last edited by stubb (2013-01-08 23:20:05)

    Hi,
    I have the same kind of issue after updated slim from v1.3.4-4 to v1.3.5-1.
    see my topic  here :
    https://bbs.archlinux.org/viewtopic.php?id=156792
    Last edited by cedricl (2013-01-24 17:16:42)

  • How clusterware restarts on automatically after server reboot in 11g R2

    Hi,
    I would like to know how the cluster restarts on automatically after the server reboot in 11g R2 RAC . The oracle restart feature in 11g R2 help to restart the components like databases, ASM in case of abnormal failure. But how the clusterware starts on own after the server reboot? can you share any documents or notes is really appreciated.
    Thanks,
    Robin.

    At Grid Infrastructure installation time system configuration is modified so that UNIX init daemon restarts OHASD: http://docs.oracle.com/cd/E11882_01/rac.112/e16794/intro.htm#BABIDEFI. For example with Oracle Linux 5 and Oracle RAC 11.2.0.1 you have following line in /etc/inittab:
    h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/nulland:
    [root@rac1 ~]# head /etc/init.d/init.ohasd
    #!/bin/sh
    # Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
    # init.ohasd - Control script for the Oracle HA services daemon
    # This script is invoked by the init system
    ORA_CRS_HOME=/u01/app/11.2.0/grid
    export ORA_CRS_HOMEEdited by: P. Forstmann on 11 févr. 2013 18:45

  • Database Down after Server Reboot

    Hello
    I am getting a weird problem after I reboot my server (windows 2003) where by my database (10.2) does not automatically start. To get it to start I have to go into administrative tools >> services and then manually restart the OracleASMService+ASM (it says it is already running).
    Thanks in advance for any Idea's/suggestions

    Right;
    After rebooting the server and lauching the OEM Database Control it tells me the following:
    - Database Instance = Down
    - Listener = Up
    - Agent Connection to Instance = Failed ORA-12505: TNS:Listener does not currently know of SID given in connect descriptor(DBD ERROR: OCIServerAttach)
    In response to your troubleshooting suggestions;
    1. alert.log has no new errors logged in the past week
    2. As far as I can tell, yes. It says the service (and other associated oracle services) are running
    3. No I can not connect to the database with sql*plus (before I restart the OracleASMService+ASM). SQL*Plus errors:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    After I restart the service I can connect without any problems.
    4. N/A
    I appreciate any help you can offer on this matter.
    Regards
    Toby

  • Oracle database performance after server reboot

    hi masters,
    this is not some kind of question, but a discussion. some statements come from our client that after weekly reboot of system, the oracle database performance is low for some time and increase after some time(say 2 days).
    i think it is but obvious, because at reboot oracle flushes all cache, and temporary space, so it need to re parse the sql statements and perform some disc I/O's so it might need some time and hence performance will degrade.
    but at the same time some people claim that after reboot their database performance is better than their normal performance for some days. it seems controversial that's why i am posting it here.
    what might be the reason behind this?? prior can have a valid reason of hard parsing, but what with second case??
    any clarification is highly appreciated...
    thank you
    regadrs
    VD

    Vikrant,
    You should wait for some time buddy, its weekend ;-) .
    this is not some kind of question, but a discussion. some statements come from our client that after weekly reboot of system, the oracle database performance is low for some time and increase after some time(say 2 days).i think it is but obvious, because at reboot oracle flushes all cache, and temporary space, so it need to re parse the sql statements and perform some disc I/O's so it might need some time and hence performance will degrade.
    >
    I would start from saying that checking the performance when the system just started, is a wrong approach. There would be lots of IOs , parsing, calculations(related to memory allocations) happening so there would be a delay/bad performance at that time. Very simple example can be parsing, another can be memory allocation. Oracle doesn't allocate the entire memory in the instance startup that is allocated to the memory areas but allocates just the bare minimum that is needed to start the instance and than after the startup, it keeps on allocating the memory. So surely enough, with the startup and after a while of it, there would be a different performance than that after the instance hsa already been started and the workload informations have started coming up.
    Its correct that Oracle would deallocate all the caches with the reboot as the instance is on the memory(physical) and with the reboot , that would be flushed including the SGA which is allocated over it. Temporary tablespace is now not freed with the reboot. I guess its a rather illogical thing to do but that's what is there now. Oracle keeps the segment allocated even after the reboot is issued, hence the reason for larger temporary tablespaces.
    >
    but at the same time some people claim that after reboot their database performance is better than their normal performance for some days. it seems controversial that's why i am posting it here.
    what might be the reason behind this?? prior can have a valid reason of hard parsing, but what with second case??
    >
    This should not come as a surprise once we understand what might be happening with this process. Assume a situation where you have undersized caches. For example, shared pool . which is very heavily used for database , if this is going to be undersized and you are not using automatic memory management, you won't be enjoying the dynamic management of this parameter. Now, if you do lots of parsing , thanks to your wrongly written queries, you would eventually end up filling up shared pool to its max thus leaving no space for incoming new hard parsed cursors. Here , if you can't manage to add more memory to add to it, the only solution left would be to flush the shared pool( as good as rebooting the db because this would do the same) and than make space for the new cursors. The performance is going to be better becausethe cursors would not be getting flushed out immediately and will be kept in the shared pool as long as its not filled up again.Once you have reached to limit of it, again there would be performance benefit. So there are always odds added to the statements like this that I rebuilt my index , I got better, I rebooted my server, my querie are much faster now. Most of the time when these kind of statements are given, they are based on what we have seen, without understading what actually might have happened. So I would siggest to hear the statement but not take them as a rule of thumb to follow.
    Hope this all makes some sense for you and would help somewhat.
    Aman....

  • Unable to execute update commands after improper shutdown

    Hi!
    It sounds a little strange.
    I am unable to execute update commands from my application. My machine was shutdown improperly. Then I loaded the datastores again. I was able to execute select commands but unable to execute update commands. It was working fine before shutdown.
    Regards
    /Ahmad

    Hi Chris!
    SQLExecute method of ODBC is returning -1.
    I have checked the syntax of the query its also correct. I am also very confused on it why is this happening. If I execute the update command from ttisql it works ok.
    The code is the same that we discussed in our previous conversation.
    The steps I did after improper shutdown:
    1. Started TimeTen daemon >ttdaemonadmin -start
    2. Loaded the Data store >ttAdmin -ramLoad spiderM
    3. Executed the code
    The output of ttstatus is as follows:
    TimesTen status report as of Fri Jun 29 21:45:41 2007
    Daemon pid 8273 port 17001 instance tt70
    TimesTen server pid 8284 started on port 17003
    TimesTen webserver pid 8280 started on port 17005
    Data store /tmp/spiderM
    There are 6 connections to the data store
    Data store is in shared mode
    Shared Memory KEY 0x08004f3c ID 557070
    Type PID Context Connection Name ConnID
    Subdaemon 8278 0x0000000000570520 Worker 2042
    Subdaemon 8278 0x00000000005dc4d0 Flusher 2043
    Subdaemon 8278 0x000000000060d5d0 Checkpoint 2044
    Subdaemon 8278 0x000000000063e5a0 Aging 2045
    Subdaemon 8278 0x000000000066f570 HistGC 2046
    Subdaemon 8278 0x00000000006a0430 Monitor 2047
    RAM residence policy: Manual
    Data store is manually loaded into RAM
    Replication policy : Manual
    Cache agent policy : Manual
    Data store /usr/users/spider/TimesTen/tt70/info/TT_tt70
    There are no connections to the data store
    Replication policy : Manual
    Cache agent policy : Manual
    Access control enabled.
    End of report
    Regards
    /Ahmad

  • Automatically start VMs after server reboot

    Hello,
    I use a OVM server (3.0.3) without clustering, and I'm doing failure simulations before going to production.
    When the server reboots after a electrical failure, all VM are in "offline" state, and I need to acknowledge all events before be able to start them (thanks the forum for this information).
    I would like to automatically boot the VM after the reboot, is there a way to do this ?
    Thanks,
    TM

    Have you tried to put a symlink to the vm.cfg in /etc/xen/auto? That works independent of VM Manager. I beleive VM Manager will update the machine to running in that situation. If not, at least your machines are running while you sort out the problems with VM Manager.
    ln -s /OVS/Repository/<repositoryUUID>/VirtualMachines/<vmUUID>/vm.cfg /etc/xen/auto/<simplename>
    Where repositoryUUID (hopefully the only one because the manager doesn't display it)
    vmUUID shows as ID on the Info page for the VM
    simplename is any name you like. I chose the name that shows as Name on the machine's Info page.
    Let us know if the Manager figures it out OK or if you have to jump through some hoops to get it to show "running" for these VMs.

  • Users have to enter licence server name after server reboot

    Hi all,
    After every reboot of their server, every users of my customer have to enter the licence server name to be able to connect to SAP. Any idea why it's happening ? Is their a file where the name of the server is saved which could be deleted ?
    Thanks
    Charles Froment

    Hi
    did you change the IP address?
    did you change any hardware piece in the server?
    In the client you can find a file called b1-current-user.xml in Application Data\SAP\SAP Business One folder.
    Open this file, and if it corrupted delete it. SBO will create another with the right configuration.
    Kind regards
    Agustín Marcos Cividanes

Maybe you are looking for