Search Results

Search found 1062 results on 43 pages for 'idle'.

Page 10/43 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Data-driven animation states

    - by user8363
    I'm trying to handle animations in a 2D game engine hobby project, without hard-coding them. Hard coding animation states seems like a common but very strange phenomenon, to me. A little background: I'm working with an entity system where components are bags of data and subsystems act upon them. I chose to use a polling system to update animation states. With animation states I mean: "walking_left", "running_left", "walking_right", "shooting", ... My idea to handle animations was to design it as a data driven model. Data could be stored in an xml file, a rdbms, ... And could be loaded at the start of a game / level/ ... This way you can easily edit animations and transitions without having to go change the code everywhere in your game. As an example I made an xml draft of the data definitions I had in mind. One very important piece of data would simply be the description of an animation. An animation would have a unique id (a descriptive name). It would hold a reference id to an image (the sprite sheet it uses, because different animations may use different sprite sheets). The frames per second to run the animation on. The "replay" here defines if an animation should be run once or infinitely. Then I defined a list of rectangles as frames. <animation id='WIZARD_WALK_LEFT'> <image id='WIZARD_WALKING' /> <fps>50</fps> <replay>true</replay> <frames> <rectangle> <x>0</x> <y>0</y> <width>45</width> <height>45</height> </rectangle> <rectangle> <x>45</x> <y>0</y> <width>45</width> <height>45</height> </rectangle> </frames> </animation> Animation data would be loaded and held in an animation resource pool and referenced by game entities that are using it. It would be treated as a resource like an image, a sound, a texture, ... The second piece of data to define would be a state machine to handle animation states and transitions. This defines each state a game entity can be in, which states it can transition to and what triggers that state change. This state machine would differ from entity to entity. Because a bird might have states "walking" and "flying" while a human would only have the state "walking". However it could be shared by different entities because multiple humans will probably have the same states (especially when you define some common NPCs like monsters, etc). Additionally an orc might have the same states as a human. Just to demonstrate that this state definition might be shared but only by a select group of game entities. <state id='IDLE'> <event trigger='LEFT_DOWN' goto='MOVING_LEFT' /> <event trigger='RIGHT_DOWN' goto='MOVING_RIGHT' /> </state> <state id='MOVING_LEFT'> <event trigger='LEFT_UP' goto='IDLE' /> <event trigger='RIGHT_DOWN' goto='MOVING_RIGHT' /> </state> <state id='MOVING_RIGHT'> <event trigger='RIGHT_UP' goto='IDLE' /> <event trigger='LEFT_DOWN' goto='MOVING_LEFT' /> </state> These states can be handled by a polling system. Each game tick it grabs the current state of a game entity and checks all triggers. If a condition is met it changes the entity's state to the "goto" state. The last part I was struggling with was how to bind animation data and animation states to an entity. The most logical approach seemed to me to add a pointer to the state machine data an entity uses and to define for each state in that machine what animation it uses. Here is an xml example how I would define the animation behavior and graphical representation of some common entities in a game, by addressing animation state and animation data id. Note that both "wizard" and "orc" have the same animation states but a different animation. Also, a different animation could mean a different sprite sheet, or even a different sequence of animations (an animation could be longer or shorter). <entity name="wizard"> <state id="IDLE" animation="WIZARD_IDLE" /> <state id="MOVING_LEFT" animation="WIZARD_WALK_LEFT" /> </entity> <entity name="orc"> <state id="IDLE" animation="ORC_IDLE" /> <state id="MOVING_LEFT" animation="ORC_WALK_LEFT" /> </entity> When the entity is being created it would add a list of states with state machine data and an animation data reference. In the future I would use the entity system to build whole entities by defining components in a similar xml format. -- This is what I have come up with after some research. However I had some trouble getting my head around it, so I was hoping op some feedback. Is there something here what doesn't make sense, or is there a better way to handle these things? I grasped the idea of iterating through frames but I'm having trouble to take it a step further and this is my attempt to do that.

    Read the article

  • Apache Tomcat Ant undeploy task error using

    - by Devil Jin
    I am using ant 1.7 to deploy and undeploy applications in tomcat //Snippet from my build.xml <target name="deploy" depends="war" description="Install application to the servlet containor"> <deploy url="${tomcat.manager.url}" username="${manager.user}" password="${manager.passwd}" path="/${tomcat.ctxpath}" war="${war.local}" /> </target> <target name="undeploy" description="Removes Web Application from path"> <undeploy url="${tomcat.manager.url}" username="${manager.user}" password="${manager.passwd}" path="/${tomcat.ctxpath}" /> </target> The deploy task works perfectly fine but the undeploy task gives an html output for the undeploy task prefixed with [undeploy] although the application is undeployed successfully The html message also contains the success message 'OK - Undeployed application at context path /MyApplication' OUTPUT: [undeploy] <html> [undeploy] <head> [undeploy] <style> [undeploy] H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tah oma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:whit e;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background :white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;} table { [undeploy] width: 100%; [undeploy] } [undeploy] td.page-title { [undeploy] text-align: center; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: white; [undeploy] color: black; [undeploy] } [undeploy] td.title { [undeploy] text-align: left; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-style:italic; [undeploy] font-weight: bold; [undeploy] background: #D2A41C; [undeploy] } [undeploy] td.header-left { [undeploy] text-align: left; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: #FFDC75; [undeploy] } [undeploy] td.header-center { [undeploy] text-align: center; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: #FFDC75; [undeploy] } [undeploy] td.row-left { [undeploy] text-align: left; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] td.row-center { [undeploy] text-align: center; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] td.row-right { [undeploy] text-align: right; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] TH { [undeploy] text-align: center; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: #FFDC75; [undeploy] } [undeploy] TD { [undeploy] text-align: center; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] </style> [undeploy] <title>/manager</title> [undeploy] </head> [undeploy] <body bgcolor="#FFFFFF"> [undeploy] <table cellspacing="4" width="100%" border="0"> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <a href="http://www.apache.org/"> [undeploy] <img border="0" alt="The Apache Software Foundation" align="left" [undeploy] src="/manager/images/asf-logo.gif"> [undeploy] </a> [undeploy] <a href="http://tomcat.apache.org/"> [undeploy] <img border="0" alt="The Tomcat Servlet/JSP Container" [undeploy] align="right" src="/manager/images/tomcat.gif"> [undeploy] </a> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <hr size="1" noshade="noshade"> [undeploy] <table cellspacing="4" width="100%" border="0"> [undeploy] <tr> [undeploy] <td class="page-title" bordercolor="#000000" align="left" nowrap> [undeploy] <font size="+2">Tomcat Web Application Manager</font> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-left" width="10%"><small><strong>Message:</strong></small>&nbsp;</td> [undeploy] <td class="row-left"><pre>OK - Undeployed application at context path /MyApplication [undeploy] </pre></td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="4" class="title">Manager</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left"><a href="/manager/html/list">List Applications</a></td> [undeploy] <td class="row-center"><a href="/manager/../docs/html-manager-howto.html">HTML Manager Help</a></td> [undeploy] <td class="row-center"><a href="/manager/../docs/manager-howto.html">Manager Help</a></td> [undeploy] <td class="row-right"><a href="/manager/status">Server Status</a></td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="5" class="title">Applications</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="header-left"><small>Path</small></td> [undeploy] <td class="header-left"><small>Display Name</small></td> [undeploy] <td class="header-center"><small>Running</small></td> [undeploy] <td class="header-center"><small>Sessions</small></td> [undeploy] <td class="header-left"><small>Commands</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small><a href="/">/</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small>Welcome to Tomcat</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager/html/sessions?path=/" target="_bla nk">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/" onclick="return(confirm('Are you sure?'))">Stop</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/reload?path=/" onclick="return(confirm('Are you sure?'))">Reload</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/" onclick="return(confirm('Are you sure?'))">Undeploy</a>&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <form method="POST" action="/manager/html/expire?path=/"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small><a href="/docs">/docs</a></small></td> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small>Tomcat Documentation</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small><a href="/manager/html/sessions?path=/docs" target=" _blank">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/docs" onclick="return(confirm('Are you sure?'))">Stop</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/reload?path=/docs" onclick="return(confirm('Are you sure?'))">Reload</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/docs" onclick="return(confirm('Are you sure?'))">Undeploy</a>&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <form method="POST" action="/manager/html/expire?path=/docs"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small><a href="/examples">/examples</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small>Servlet and JSP Examples</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager/html/sessions?path=/examples" targ et="_blank">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/examples" onclick="return(confirm('Are you sure?'))">Stop</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/reload?path=/examples" onclick="return(confirm('Are you sure?'))">Reload</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/examples" onclick="return(confirm('Are you sure?'))">Undeploy</a>&n bsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <form method="POST" action="/manager/html/expire?path=/examples"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small><a href="/host%2Dmanager">/host-manager</a></small></t d> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small>Tomcat Manager Application</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small><a href="/manager/html/sessions?path=/host%2Dmanager " target="_blank">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/host%2Dmanager" onclick="return(confirm('Are you sure?'))">Stop</a>&nbs p; [undeploy] &nbsp;<a href="/manager/html/reload?path=/host%2Dmanager" onclick="return(confirm('Are you sure?'))">Reload</a> &nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/host%2Dmanager" onclick="return(confirm('Are you sure?'))">Undeploy </a>&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <form method="POST" action="/manager/html/expire?path=/host%2Dmanager"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager">/manager</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small>Tomcat Manager Application</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager/html/sessions?path=/manager" targe t="_blank">3</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;Stop&nbsp; [undeploy] &nbsp;Reload&nbsp; [undeploy] &nbsp;Undeploy&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <form method="POST" action="/manager/html/expire?path=/manager"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="2" class="title">Deploy</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2" class="header-left"><small>Deploy directory or WAR file located on server</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <form method="get" action="/manager/html/deploy"> [undeploy] <table cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>Context Path (required):</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="text" name="deployPath" size="20"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>XML Configuration file URL:</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="text" name="deployConfig" size="20"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>WAR or Directory URL:</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="text" name="deployWar" size="40"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] &nbsp; [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="submit" value="Deploy"> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2" class="header-left"><small>WAR file to deploy</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <form action="/manager/html/upload" method="post" enctype="multipart/form-data"> [undeploy] <table cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>Select WAR file to upload</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="file" name="deployWar" size="40"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] &nbsp; [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="submit" value="Deploy"> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] </form> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="2" class="title">Diagnostics</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2" class="header-left"><small>Check to see if a web application has caused a memory leak on stop, r eload or undeploy</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <form method="post" action="/manager/html/findleaks"> [undeploy] <table cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-left"> [undeploy] <input type="submit" value="Find leaks"> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <small>This diagnostic check will trigger a full garbage collection. Use it with extreme caution on production systems.</small> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <br><table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="6" class="title">Server Information</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="header-center"><small>Tomcat Version</small></td> [undeploy] <td class="header-center"><small>JVM Version</small></td> [undeploy] <td class="header-center"><small>JVM Vendor</small></td> [undeploy] <td class="header-center"><small>OS Name</small></td> [undeploy] <td class="header-center"><small>OS Version</small></td> [undeploy] <td class="header-center"><small>OS Architecture</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-center"><small>Apache Tomcat/6.0.26</small></td> [undeploy] <td class="row-center"><small>1.5.0_09-b01</small></td> [undeploy] <td class="row-center"><small>Sun Microsystems Inc.</small></td> [undeploy] <td class="row-center"><small>Windows XP</small></td> [undeploy] <td class="row-center"><small>5.1</small></td> [undeploy] <td class="row-center"><small>x86</small></td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <hr size="1" noshade="noshade"> [undeploy] <center><font size="-1" color="#525D76"> [undeploy] <em>Copyright &copy; 1999-2010, Apache Software Foundation</em></font></center> [undeploy] </body> [undeploy] </html>

    Read the article

  • ant undeploy task error

    - by Devil Jin
    I am using ant 1.7 to deploy and undeploy applications in tomcat //Snippet from my build.xml <target name="deploy" depends="war" description="Install application to the servlet containor"> <deploy url="${tomcat.manager.url}" username="${manager.user}" password="${manager.passwd}" path="/${tomcat.ctxpath}" war="${war.local}" /> </target> <target name="undeploy" description="Removes Web Application from path"> <undeploy url="${tomcat.manager.url}" username="${manager.user}" password="${manager.passwd}" path="/${tomcat.ctxpath}" /> </target> The deploy task works perfectly fine but the undeploy task gives an html output for the undeploy task prefixed with [undeploy] although the application is undeployed successfully The html message also contains the success message 'OK - Undeployed application at context path /MyApplication' OUTPUT: [undeploy] <html> [undeploy] <head> [undeploy] <style> [undeploy] H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tah oma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:whit e;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background :white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;} table { [undeploy] width: 100%; [undeploy] } [undeploy] td.page-title { [undeploy] text-align: center; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: white; [undeploy] color: black; [undeploy] } [undeploy] td.title { [undeploy] text-align: left; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-style:italic; [undeploy] font-weight: bold; [undeploy] background: #D2A41C; [undeploy] } [undeploy] td.header-left { [undeploy] text-align: left; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: #FFDC75; [undeploy] } [undeploy] td.header-center { [undeploy] text-align: center; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: #FFDC75; [undeploy] } [undeploy] td.row-left { [undeploy] text-align: left; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] td.row-center { [undeploy] text-align: center; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] td.row-right { [undeploy] text-align: right; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] TH { [undeploy] text-align: center; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: #FFDC75; [undeploy] } [undeploy] TD { [undeploy] text-align: center; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] </style> [undeploy] <title>/manager</title> [undeploy] </head> [undeploy] <body bgcolor="#FFFFFF"> [undeploy] <table cellspacing="4" width="100%" border="0"> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <a href="http://www.apache.org/"> [undeploy] <img border="0" alt="The Apache Software Foundation" align="left" [undeploy] src="/manager/images/asf-logo.gif"> [undeploy] </a> [undeploy] <a href="http://tomcat.apache.org/"> [undeploy] <img border="0" alt="The Tomcat Servlet/JSP Container" [undeploy] align="right" src="/manager/images/tomcat.gif"> [undeploy] </a> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <hr size="1" noshade="noshade"> [undeploy] <table cellspacing="4" width="100%" border="0"> [undeploy] <tr> [undeploy] <td class="page-title" bordercolor="#000000" align="left" nowrap> [undeploy] <font size="+2">Tomcat Web Application Manager</font> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-left" width="10%"><small><strong>Message:</strong></small>&nbsp;</td> [undeploy] <td class="row-left"><pre>OK - Undeployed application at context path /MyApplication [undeploy] </pre></td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="4" class="title">Manager</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left"><a href="/manager/html/list">List Applications</a></td> [undeploy] <td class="row-center"><a href="/manager/../docs/html-manager-howto.html">HTML Manager Help</a></td> [undeploy] <td class="row-center"><a href="/manager/../docs/manager-howto.html">Manager Help</a></td> [undeploy] <td class="row-right"><a href="/manager/status">Server Status</a></td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="5" class="title">Applications</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="header-left"><small>Path</small></td> [undeploy] <td class="header-left"><small>Display Name</small></td> [undeploy] <td class="header-center"><small>Running</small></td> [undeploy] <td class="header-center"><small>Sessions</small></td> [undeploy] <td class="header-left"><small>Commands</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small><a href="/">/</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small>Welcome to Tomcat</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager/html/sessions?path=/" target="_bla nk">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/" onclick="return(confirm('Are you sure?'))">Stop</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/reload?path=/" onclick="return(confirm('Are you sure?'))">Reload</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/" onclick="return(confirm('Are you sure?'))">Undeploy</a>&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <form method="POST" action="/manager/html/expire?path=/"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small><a href="/docs">/docs</a></small></td> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small>Tomcat Documentation</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small><a href="/manager/html/sessions?path=/docs" target=" _blank">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/docs" onclick="return(confirm('Are you sure?'))">Stop</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/reload?path=/docs" onclick="return(confirm('Are you sure?'))">Reload</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/docs" onclick="return(confirm('Are you sure?'))">Undeploy</a>&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <form method="POST" action="/manager/html/expire?path=/docs"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small><a href="/examples">/examples</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small>Servlet and JSP Examples</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager/html/sessions?path=/examples" targ et="_blank">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/examples" onclick="return(confirm('Are you sure?'))">Stop</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/reload?path=/examples" onclick="return(confirm('Are you sure?'))">Reload</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/examples" onclick="return(confirm('Are you sure?'))">Undeploy</a>&n bsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <form method="POST" action="/manager/html/expire?path=/examples"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small><a href="/host%2Dmanager">/host-manager</a></small></t d> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small>Tomcat Manager Application</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small><a href="/manager/html/sessions?path=/host%2Dmanager " target="_blank">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/host%2Dmanager" onclick="return(confirm('Are you sure?'))">Stop</a>&nbs p; [undeploy] &nbsp;<a href="/manager/html/reload?path=/host%2Dmanager" onclick="return(confirm('Are you sure?'))">Reload</a> &nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/host%2Dmanager" onclick="return(confirm('Are you sure?'))">Undeploy </a>&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <form method="POST" action="/manager/html/expire?path=/host%2Dmanager"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager">/manager</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small>Tomcat Manager Application</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager/html/sessions?path=/manager" targe t="_blank">3</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;Stop&nbsp; [undeploy] &nbsp;Reload&nbsp; [undeploy] &nbsp;Undeploy&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <form method="POST" action="/manager/html/expire?path=/manager"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="2" class="title">Deploy</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2" class="header-left"><small>Deploy directory or WAR file located on server</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <form method="get" action="/manager/html/deploy"> [undeploy] <table cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>Context Path (required):</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="text" name="deployPath" size="20"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>XML Configuration file URL:</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="text" name="deployConfig" size="20"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>WAR or Directory URL:</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="text" name="deployWar" size="40"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] &nbsp; [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="submit" value="Deploy"> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2" class="header-left"><small>WAR file to deploy</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <form action="/manager/html/upload" method="post" enctype="multipart/form-data"> [undeploy] <table cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>Select WAR file to upload</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="file" name="deployWar" size="40"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] &nbsp; [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="submit" value="Deploy"> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] </form> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="2" class="title">Diagnostics</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2" class="header-left"><small>Check to see if a web application has caused a memory leak on stop, r eload or undeploy</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <form method="post" action="/manager/html/findleaks"> [undeploy] <table cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-left"> [undeploy] <input type="submit" value="Find leaks"> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <small>This diagnostic check will trigger a full garbage collection. Use it with extreme caution on production systems.</small> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <br><table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="6" class="title">Server Information</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="header-center"><small>Tomcat Version</small></td> [undeploy] <td class="header-center"><small>JVM Version</small></td> [undeploy] <td class="header-center"><small>JVM Vendor</small></td> [undeploy] <td class="header-center"><small>OS Name</small></td> [undeploy] <td class="header-center"><small>OS Version</small></td> [undeploy] <td class="header-center"><small>OS Architecture</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-center"><small>Apache Tomcat/6.0.26</small></td> [undeploy] <td class="row-center"><small>1.5.0_09-b01</small></td> [undeploy] <td class="row-center"><small>Sun Microsystems Inc.</small></td> [undeploy] <td class="row-center"><small>Windows XP</small></td> [undeploy] <td class="row-center"><small>5.1</small></td> [undeploy] <td class="row-center"><small>x86</small></td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <hr size="1" noshade="noshade"> [undeploy] <center><font size="-1" color="#525D76"> [undeploy] <em>Copyright &copy; 1999-2010, Apache Software Foundation</em></font></center> [undeploy] </body> [undeploy] </html>

    Read the article

  • Nginx and PHP-FPM running out of connections

    - by E3pO
    I keep running into errors like these, [02-Jun-2012 01:52:04] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 19 idle, and 49 total children [02-Jun-2012 01:52:05] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 19 idle, and 50 total children [02-Jun-2012 01:52:06] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 19 idle, and 51 total children [02-Jun-2012 03:10:51] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 18 idle, and 91 total children I changed my settings for php-fpm to these, pm.max_children = 150 (It was at 100, i got a max_children reached and upped to 150) pm.start_servers = 75 pm.min_spare_servers = 20 pm.max_spare_servers = 150 Resulting in [02-Jun-2012 01:39:19] WARNING: [pool www] server reached pm.max_children setting (150), consider raising it I've just launched a new website that is getting a conciderable amount of traffic on it. This traffic is legitimate and users are getting 504 gateway timeouts when the limit is reached. I have limited connections to my server with IPTABLES and I'm running fail2ban and keeping track of nginx access logs. The traffic is all legitimate, i'm just running out of room for users. I'm currently running on a dual core box with ubuntu 64bit. free total used free shared buffers cached Mem: 6114284 5726984 387300 0 141612 4985384 -/+ buffers/cache: 599988 5514296 Swap: 524284 5804 518480 My php.ini max_input_time = 60 My nginx config is worker_processes 4; pid /var/run/nginx.pid; events { worker_connections 19000; # multi_accept on; } worker_rlimit_nofile 20000; #each connection needs a filehandle (or 2 if you are proxying) client_max_body_size 30M; client_body_timeout 10; client_header_timeout 10; keepalive_timeout 5 5; send_timeout 10; location ~ \.php$ { try_files $uri /er/error.php; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffer_size 128k; fastcgi_buffers 256 16k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_max_temp_file_size 0; fastcgi_intercept_errors on; fastcgi_pass unix:/tmp/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } What can I do to stop running out of connections? Why does this keep occurring? I'm monitoring my traffic on Google Analytics realtime and when the user count gets above about 120 my php-fpm.log is full of these warnings..

    Read the article

  • Internet Connection losing

    - by Mehdi Golchin
    When my internet connection is idle for a while about 5 mins, the connection will be lost. It merely happens when the connection is idle, not during download. I'm using an ADSL service by a HUAWEI smartAX MT882a ADSL modem. Any help will be appreciated

    Read the article

  • how to set multiple white spaces (ex: tabs) as delimiters in bash's `cut`

    - by Idlecool
    I want to retrieve the cpu usage/free percentage from mpstat output. The bash cut can be used to retrieve such details but i dont know what should be the delimiter viz. [idlecool@archbitch proc]$ mpstat | grep "all" | cut -d '$x' -f11 what should be $x so that i can skip white spaces and select value corresponding to %idle? Output of mpstat: [idlecool@archbitch proc]$ mpstat Linux 2.6.36-ARCH (archbitch) 01/14/11 _i686_ (2 CPU) 19:58:53 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 19:58:53 all 5.51 0.01 2.96 0.84 0.00 0.01 0.00 0.00 90.66

    Read the article

  • NIC going to sleep on Ubuntu Server 10.04

    - by user43390
    When I leave my server idle for about 10 minutes the network will stop responding to outside connections. If I get on the server and attempt to use the network(ping google for example) there will be a delay for a few seconds and then it works. After this incoming connections work again until I leave it idle again. Why does this happen and how can I fix it?

    Read the article

  • VMware guest eats 100% cpu

    - by chris
    I have a Windows 7 x64 guest that acts very strange - the VM is very slow and taskmgr will consume 50% (with 2 cores) or up to 99% (single) of the CPU when everything else is idle. Host is Windows 7 x64 with VMware Workstation 7.0.1 VMware tools are installed the same VM, when running on another PC with VMware Server 2.0 will work OK (CPU at ~0% when idle) I've tried (with no effects) enabled/disabled 3d selected 1 or 2 cores adjusted memory (1gb/500mb) adjusted the bios mem.hotadd = "FALSE" disabled page trimming Windows 7 x86 guests on the same machine do not have this problem.

    Read the article

  • objective-c description method

    - by rocity
    Maybe I'm stupid...and this is my first question so forgive me...but when I run this code, I get the following output: (FROG idle:0 animating:0 rect:(null) position:{{1,2}{3,4}} tongue:{5,6}) This is wrong because it seems to be skipping the rect format string and placing everything displaced by one. So idle and animating are what i expect, then rect is skipped, but the result from NSStringFromCGRect(self.rect) is placed into position, then the result for position is pushed to tongue, then tongue is not displayed at all. I'm at a loss. - (NSString *)description{ return [NSString stringWithFormat:@"(FROG idle:%i animating:%i rect:%@ position:%@ tongue:%@)", self.idleTime, self.animating, NSStringFromCGRect(self.rect), NSStringFromCGPoint(self.position), tongue ]; }

    Read the article

  • removing a line from a text file?

    - by Blackbinary
    Hi all. I am working with a text file, which contains a list of processes under my programs control, along with relevant data. At some point, one of the processes will finish, and thus will need to be removed from the file (as its no longer under control). Here is a sample of the file contents (which has enteries added "randomly"): PID=25729 IDLE=0.200000 BUSY=0.300000 USER=-10.000000 PID=26416 IDLE=0.100000 BUSY=0.800000 USER=-20.000000 PID=26522 IDLE=0.400000 BUSY=0.700000 USER=-30.000000 So for example, if I wanted to remove the line that says PID=26416.... how could I do that, without writing the file over again? I can use external unix commands, however I am not very familiar with them so please if that is your suggestion, give an example. Thanks!

    Read the article

  • what is the best setting for using lighttpd on 8G ram?

    - by user299415
    I have running 8GB ram and 8 x Xeon 3361 system! What is the best setting for running simultaneous connection! What is the maximum? Is setting like this correct? server.max-keep-alive-requests = 0 server.max-keep-alive-idle = 10 server.max-read-idle = 60 server.max-write-idle = 60 server.event-handler = "linux-sysepoll" server.max-fds = 2048 fastcgi.server = ( ".php" = ( "localhost" = ( "socket" = "/tmp/php-fastcgi.socket", "bin-path" = "/usr/bin/php-cgi", "max-procs" = 20, "bin-environment" = ( "PHP_FCGI_CHILDREN" = "40", "PHP_FCGI_MAX_REQUESTS" = "800" ), "broken-scriptfilename" = "enable" ) ) ) please help me!

    Read the article

  • Objective-C stringWithFormat misses an argument?

    - by rocity
    When I run this code: - (NSString *)description{ return [NSString stringWithFormat:@"(FROG idle:%i animating:%i rect:%@ position:%@ tongue:%@)", self.idleTime, self.animating, NSStringFromCGRect(self.rect), NSStringFromCGPoint(self.position), tongue ]; } I get the following output: (FROG idle:0 animating:0 rect:(null) position:{{1,2}{3,4}} tongue:{5,6}) This is wrong because it seems to be skipping the rect format string and placing everything displaced by one. So idle and animating are what I expect, then rect is skipped, but the result from NSStringFromCGRect(self.rect) is placed into position, then the result for position is pushed to tongue, then tongue is not displayed at all. I'm at a loss.

    Read the article

  • PHP pages working slow from time to time

    - by user1038179
    I have VPS with limit of 2GB of ram and 8 CPU cores. I have 5 sites on that VPS (one of them is just for testing, no visitors exept me). All 5 sites are image galleries, like wallpaper sites. Last week I noticed problem on one site (main domain, used for name servers, and also with most traffic, visitors). That site has two image galleries, one is old static html gallery made few years ago and another, main, is powered by ZENPhoto CMS. Also I have that same gallery CMS on another two sites on that same VPS (on one running site and on one just for testing site). On other two sites I have diferent PHP driven gallery. Problem is that after some time (it vary from 10 minutes to few hours after apache restart), loading of pages on main site becomes very slow, or I get 503 Service Temporarily Unavailable error. So pages becomes unavailable. But just that part with new CMS gallery, old part of site with static html pages are working fast and just fine. Also other two sites with same CMS gallery and other two with different PHP driven gallery are working fine and fast at the same time. I thought it must be something with CMS on that main site, because other sites are working nice. Then I tryed to open contact and guest book pages on that main site which are outside of that CMS but also PHP pages, and they do not load too, but that same contact php scipts are working on other sites at the same time. So, when site starts to hangs, ONLY PHP generated content is not working, like I said other static pages are working. And, ONLY on that one main site I have problems. Then I need to restart Apache, after restart everything is vorking nice and fast, for some time, than again, just PHP pages on main site are becomming slower. If I do not restart apache that slowness take some time (several minutes, hours, depending ot traffic) and during that time PHP diven content is loading very slow or unavailable on that site. After sime time, on moments everything start to work and is fast again for some time, and again. In hours with more traffic PHP content is loading slowly or it is unavailable, in hours with less traffic it is sometimes fast and sometimes little bit slower than usually. And ones again, only on that main site, and only PHP driven pages, static pages are working fast even in most traffic hours also other sites with even same CMS are working fast. Currently I have about 7000 unique visitors on that site but site worked nice even with 11500 visitors per day. And about 17000 in total visitors on VPS, all sites ( about 3 pages per unique visitor). When site start to slow down sometimes in apache status I can see something like this: mod_fcgid status: Total FastCGI processes: 37 Process: php5 (/usr/local/cpanel/cgi-sys/php5)Pid Active Idle Accesses State 11300 39 28 7 Working 11274 47 28 7 Working 11296 40 29 3 Working 11283 45 30 3 Working 11304 36 31 1 Working 11282 46 32 3 Working 11292 42 33 1 Working 11289 44 34 1 Working 11305 35 35 0 Working 11273 48 36 2 Working 11280 47 39 1 Working 10125 133 40 12 Exiting(communication error) 11294 41 41 1 Exiting(communication error) 11277 47 42 2 Exiting(communication error) 11291 43 43 1 Exiting(communication error) 10187 108 43 10 Exiting(communication error) 10209 95 44 7 Exiting(communication error) 10171 113 44 5 Exiting(communication error) 11275 47 47 1 Exiting(communication error) 10144 125 48 8 Exiting(communication error) 10086 149 48 20 Exiting(communication error) 10212 94 49 5 Exiting(communication error) 10158 118 49 5 Exiting(communication error) 10169 114 50 4 Exiting(communication error) 10105 141 50 16 Exiting(communication error) 10094 146 50 15 Exiting(communication error) 10115 139 51 17 Exiting(communication error) 10213 93 51 9 Exiting(communication error) 10197 103 51 7 Exiting(communication error) Process: php5 (/usr/local/cpanel/cgi-sys/php5)Pid Active Idle Accesses State 7983 1079 2 149 Ready 7979 1079 11 151 Ready Process: php5 (/usr/local/cpanel/cgi-sys/php5)Pid Active Idle Accesses State 7990 1066 0 57 Ready 8001 1031 64 35 Ready 7999 1032 94 29 Ready 8000 1031 91 36 Ready 8002 1029 34 52 Ready Process: php5 (/usr/local/cpanel/cgi-sys/php5)Pid Active Idle Accesses State 7991 1064 29 115 Ready When it is working nicly there is no lines with "Exiting(communication error)" Active and Idle are time active and time since last request, in seconds. Here are system info. Sysem info: Total processors: 8 Processor #1 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5440 @ 2.83GHz Speed 88.320 MHz Cache 6144 KB All other seven are the same. System Information Linux vps.nnnnnnnnnnnnnnnnn.nnn 2.6.18-028stab099.3 #1 SMP Wed Mar 7 15:20:22 MSK 2012 x86_64 x86_64 x86_64 GNU/Linux Current Memory Usage total used free shared buffers cached Mem: 8388608 882164 7506444 0 0 0 -/+ buffers/cache: 882164 7506444 Swap: 0 0 0 Total: 8388608 882164 7506444 Current Disk Usage Filesystem Size Used Avail Use% Mounted on /dev/vzfs 100G 34G 67G 34% / none System Details: Running on: Apache/2.2.22 System info: (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_fcgid/2.3.6 Powered by: PHP/5.3.10 Current Configuration Default PHP Version (.php files) 5 PHP 5 Handler fcgi PHP 4 Handler suphp Apache suEXEC on Apache Ruid2 off PHP 4 Handler suphp Apache suEXEC on Apache Configuration The following settings have been saved: fileetag: All keepalive: On keepalivetimeout: 3 maxclients: 150 maxkeepaliverequests: 10 maxrequestsperchild: 10000 maxspareservers: 10 minspareservers: 5 root_options: ExecCGI, FollowSymLinks, Includes, IncludesNOEXEC, Indexes, MultiViews, SymLinksIfOwnerMatch serverlimit: 256 serversignature: Off servertokens: Full sslciphersuite: ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP:!kEDH startservers: 5 timeout: 30 I hope, I explained my problem nicely. Any help would be nice.

    Read the article

  • Scaling-out Your Services by Message Bus based WCF Transport Extension &ndash; Part 1 &ndash; Background

    - by Shaun
    Cloud computing gives us more flexibility on the computing resource, we can provision and deploy an application or service with multiple instances over multiple machines. With the increment of the service instances, how to balance the incoming message and workload would become a new challenge. Currently there are two approaches we can use to pass the incoming messages to the service instances, I would like call them dispatcher mode and pulling mode.   Dispatcher Mode The dispatcher mode introduces a role which takes the responsible to find the best service instance to process the request. The image below describes the sharp of this mode. There are four clients communicate with the service through the underlying transportation. For example, if we are using HTTP the clients might be connecting to the same service URL. On the server side there’s a dispatcher listening on this URL and try to retrieve all messages. When a message came in, the dispatcher will find a proper service instance to process it. There are three mechanism to find the instance: Round-robin: Dispatcher will always send the message to the next instance. For example, if the dispatcher sent the message to instance 2, then the next message will be sent to instance 3, regardless if instance 3 is busy or not at that moment. Random: Dispatcher will find a service instance randomly, and same as the round-robin mode it regardless if the instance is busy or not. Sticky: Dispatcher will send all related messages to the same service instance. This approach always being used if the service methods are state-ful or session-ful. But as you can see, all of these approaches are not really load balanced. The clients will send messages at any time, and each message might take different process duration on the server side. This means in some cases, some of the service instances are very busy while others are almost idle. For example, if we were using round-robin mode, it could be happened that most of the simple task messages were passed to instance 1 while the complex ones were sent to instance 3, even though instance 1 should be idle. This brings some problem in our architecture. The first one is that, the response to the clients might be longer than it should be. As it’s shown in the figure above, message 6 and 9 can be processed by instance 1 or instance 2, but in reality they were dispatched to the busy instance 3 since the dispatcher and round-robin mode. Secondly, if there are many requests came from the clients in a very short period, service instances might be filled by tons of pending tasks and some instances might be crashed. Third, if we are using some cloud platform to host our service instances, for example the Windows Azure, the computing resource is billed by service deployment period instead of the actual CPU usage. This means if any service instance is idle it is wasting our money! Last one, the dispatcher would be the bottleneck of our system since all incoming messages must be routed by the dispatcher. If we are using HTTP or TCP as the transport, the dispatcher would be a network load balance. If we wants more capacity, we have to scale-up, or buy a hardware load balance which is very expensive, as well as scaling-out the service instances. Pulling Mode Pulling mode doesn’t need a dispatcher to route the messages. All service instances are listening to the same transport and try to retrieve the next proper message to process if they are idle. Since there is no dispatcher in pulling mode, it requires some features on the transportation. The transportation must support multiple client connection and server listening. HTTP and TCP doesn’t allow multiple clients are listening on the same address and port, so it cannot be used in pulling mode directly. All messages in the transportation must be FIFO, which means the old message must be received before the new one. Message selection would be a plus on the transportation. This means both service and client can specify some selection criteria and just receive some specified kinds of messages. This feature is not mandatory but would be very useful when implementing the request reply and duplex WCF channel modes. Otherwise we must have a memory dictionary to store the reply messages. I will explain more about this in the following articles. Message bus, or the message queue would be best candidate as the transportation when using the pulling mode. First, it allows multiple application to listen on the same queue, and it’s FIFO. Some of the message bus also support the message selection, such as TIBCO EMS, RabbitMQ. Some others provide in memory dictionary which can store the reply messages, for example the Redis. The principle of pulling mode is to let the service instances self-managed. This means each instance will try to retrieve the next pending incoming message if they finished the current task. This gives us more benefit and can solve the problems we met with in the dispatcher mode. The incoming message will be received to the best instance to process, which means this will be very balanced. And it will not happen that some instances are busy while other are idle, since the idle one will retrieve more tasks to make them busy. Since all instances are try their best to be busy we can use less instances than dispatcher mode, which more cost effective. Since there’s no dispatcher in the system, there is no bottleneck. When we introduced more service instances, in dispatcher mode we have to change something to let the dispatcher know the new instances. But in pulling mode since all service instance are self-managed, there no extra change at all. If there are many incoming messages, since the message bus can queue them in the transportation, service instances would not be crashed. All above are the benefits using the pulling mode, but it will introduce some problem as well. The process tracking and debugging become more difficult. Since the service instances are self-managed, we cannot know which instance will process the message. So we need more information to support debug and track. Real-time response may not be supported. All service instances will process the next message after the current one has done, if we have some real-time request this may not be a good solution. Compare with the Pros and Cons above, the pulling mode would a better solution for the distributed system architecture. Because what we need more is the scalability, cost-effect and the self-management.   WCF and WCF Transport Extensibility Windows Communication Foundation (WCF) is a framework for building service-oriented applications. In the .NET world WCF is the best way to implement the service. In this series I’m going to demonstrate how to implement the pulling mode on top of a message bus by extending the WCF. I don’t want to deep into every related field in WCF but will highlight its transport extensibility. When we implemented an RPC foundation there are many aspects we need to deal with, for example the message encoding, encryption, authentication and message sending and receiving. In WCF, each aspect is represented by a channel. A message will be passed through all necessary channels and finally send to the underlying transportation. And on the other side the message will be received from the transport and though the same channels until the business logic. This mode is called “Channel Stack” in WCF, and the last channel in the channel stack must always be a transport channel, which takes the responsible for sending and receiving the messages. As we are going to implement the WCF over message bus and implement the pulling mode scaling-out solution, we need to create our own transport channel so that the client and service can exchange messages over our bus. Before we deep into the transport channel, let’s have a look on the message exchange patterns that WCF defines. Message exchange pattern (MEP) defines how client and service exchange the messages over the transportation. WCF defines 3 basic MEPs which are datagram, Request-Reply and Duplex. Datagram: Also known as one-way, or fire-forgot mode. The message sent from the client to the service, and no need any reply from the service. The client doesn’t care about the message result at all. Request-Reply: Very common used pattern. The client send the request message to the service and wait until the reply message comes from the service. Duplex: The client sent message to the service, when the service processing the message it can callback to the client. When callback the service would be like a client while the client would be like a service. In WCF, each MEP represent some channels associated. MEP Channels Datagram IInputChannel, IOutputChannel Request-Reply IRequestChannel, IReplyChannel Duplex IDuplexChannel And the channels are created by ChannelListener on the server side, and ChannelFactory on the client side. The ChannelListener and ChannelFactory are created by the TransportBindingElement. The TransportBindingElement is created by the Binding, which can be defined as a new binding or from a custom binding. For more information about the transport channel mode, please refer to the MSDN document. The figure below shows the transport channel objects when using the request-reply MEP. And this is the datagram MEP. And this is the duplex MEP. After investigated the WCF transport architecture, channel mode and MEP, we finally identified what we should do to extend our message bus based transport layer. They are: Binding: (Optional) Defines the channel elements in the channel stack and added our transport binding element at the bottom of the stack. But we can use the build-in CustomBinding as well. TransportBindingElement: Defines which MEP is supported in our transport and create the related ChannelListener and ChannelFactory. This also defines the scheme of the endpoint if using this transport. ChannelListener: Create the server side channel based on the MEP it’s. We can have one ChannelListener to create channels for all supported MEPs, or we can have ChannelListener for each MEP. In this series I will use the second approach. ChannelFactory: Create the client side channel based on the MEP it’s. We can have one ChannelFactory to create channels for all supported MEPs, or we can have ChannelFactory for each MEP. In this series I will use the second approach. Channels: Based on the MEPs we want to support, we need to implement the channels accordingly. For example, if we want our transport support Request-Reply mode we should implement IRequestChannel and IReplyChannel. In this series I will implement all 3 MEPs listed above one by one. Scaffold: In order to make our transport extension works we also need to implement some scaffold stuff. For example we need some classes to send and receive message though out message bus. We also need some codes to read and write the WCF message, etc.. These are not necessary but would be very useful in our example.   Message Bus There is only one thing remained before we can begin to implement our scaling-out support WCF transport, which is the message bus. As I mentioned above, the message bus must have some features to fulfill all the WCF MEPs. In my company we will be using TIBCO EMS, which is an enterprise message bus product. And I have said before we can use any message bus production if it’s satisfied with our requests. Here I would like to introduce an interface to separate the message bus from the WCF. This allows us to implement the bus operations by any kinds bus we are going to use. The interface would be like this. 1: public interface IBus : IDisposable 2: { 3: string SendRequest(string message, bool fromClient, string from, string to = null); 4:  5: void SendReply(string message, bool fromClient, string replyTo); 6:  7: BusMessage Receive(bool fromClient, string replyTo); 8: } There are only three methods for the bus interface. Let me explain one by one. The SendRequest method takes the responsible for sending the request message into the bus. The parameters description are: message: The WCF message content. fromClient: Indicates if this message was came from the client. from: The channel ID that this message was sent from. The channel ID will be generated when any kinds of channel was created, which will be explained in the following articles. to: The channel ID that this message should be received. In Request-Reply and Duplex MEP this is necessary since the reply message must be received by the channel which sent the related request message. The SendReply method takes the responsible for sending the reply message. It’s very similar as the previous one but no “from” parameter. This is because it’s no need to reply a reply message again in any MEPs. The Receive method takes the responsible for waiting for a incoming message, includes the request message and specified reply message. It returned a BusMessage object, which contains some information about the channel information. The code of the BusMessage class is 1: public class BusMessage 2: { 3: public string MessageID { get; private set; } 4: public string From { get; private set; } 5: public string ReplyTo { get; private set; } 6: public string Content { get; private set; } 7:  8: public BusMessage(string messageId, string fromChannelId, string replyToChannelId, string content) 9: { 10: MessageID = messageId; 11: From = fromChannelId; 12: ReplyTo = replyToChannelId; 13: Content = content; 14: } 15: } Now let’s implement a message bus based on the IBus interface. Since I don’t want you to buy and install the TIBCO EMS or any other message bus products, I will implement an in process memory bus. This bus is only for test and sample purpose. It can only be used if the service and client are in the same process. Very straightforward. 1: public class InProcMessageBus : IBus 2: { 3: private readonly ConcurrentDictionary<Guid, InProcMessageEntity> _queue; 4: private readonly object _lock; 5:  6: public InProcMessageBus() 7: { 8: _queue = new ConcurrentDictionary<Guid, InProcMessageEntity>(); 9: _lock = new object(); 10: } 11:  12: public string SendRequest(string message, bool fromClient, string from, string to = null) 13: { 14: var entity = new InProcMessageEntity(message, fromClient, from, to); 15: _queue.TryAdd(entity.ID, entity); 16: return entity.ID.ToString(); 17: } 18:  19: public void SendReply(string message, bool fromClient, string replyTo) 20: { 21: var entity = new InProcMessageEntity(message, fromClient, null, replyTo); 22: _queue.TryAdd(entity.ID, entity); 23: } 24:  25: public BusMessage Receive(bool fromClient, string replyTo) 26: { 27: InProcMessageEntity e = null; 28: while (true) 29: { 30: lock (_lock) 31: { 32: var entity = _queue 33: .Where(kvp => kvp.Value.FromClient == fromClient && (kvp.Value.To == replyTo || string.IsNullOrWhiteSpace(kvp.Value.To))) 34: .FirstOrDefault(); 35: if (entity.Key != Guid.Empty && entity.Value != null) 36: { 37: _queue.TryRemove(entity.Key, out e); 38: } 39: } 40: if (e == null) 41: { 42: Thread.Sleep(100); 43: } 44: else 45: { 46: return new BusMessage(e.ID.ToString(), e.From, e.To, e.Content); 47: } 48: } 49: } 50:  51: public void Dispose() 52: { 53: } 54: } The InProcMessageBus stores the messages in the objects of InProcMessageEntity, which can take some extra information beside the WCF message itself. 1: public class InProcMessageEntity 2: { 3: public Guid ID { get; set; } 4: public string Content { get; set; } 5: public bool FromClient { get; set; } 6: public string From { get; set; } 7: public string To { get; set; } 8:  9: public InProcMessageEntity() 10: : this(string.Empty, false, string.Empty, string.Empty) 11: { 12: } 13:  14: public InProcMessageEntity(string content, bool fromClient, string from, string to) 15: { 16: ID = Guid.NewGuid(); 17: Content = content; 18: FromClient = fromClient; 19: From = from; 20: To = to; 21: } 22: }   Summary OK, now I have all necessary stuff ready. The next step would be implementing our WCF message bus transport extension. In this post I described two scaling-out approaches on the service side especially if we are using the cloud platform: dispatcher mode and pulling mode. And I compared the Pros and Cons of them. Then I introduced the WCF channel stack, channel mode and the transport extension part, and identified what we should do to create our own WCF transport extension, to let our WCF services using pulling mode based on a message bus. And finally I provided some classes that need to be used in the future posts that working against an in process memory message bus, for the demonstration purpose only. In the next post I will begin to implement the transport extension step by step.   Hope this helps, Shaun All documents and related graphics, codes are provided "AS IS" without warranty of any kind. Copyright © Shaun Ziyan Xu. This work is licensed under the Creative Commons License.

    Read the article

  • SATA errors reported during boot: exception Emask 0x40 SAct 0x0 SErr 0x80800 action 0x0

    - by digby280
    I have noticed some error during the Linux boot. They seem to continue to occur after the boot adding lines to the log every few seconds. Once booted this normally does not appear to be causing any problems. However, around 1 in 10 boots results in a kernel panic and the computer has on two or three occasions suddenly rebooted after being powered on for a number of hours. I presume the cause of the reboot is a kernel panic as well. I am running Ubuntu 11.10 and I have had Ubuntu installed on the computer for around a year. I have googled around and not found anything useful. I have provided the kernel log lines and the output of smartctl. Can anyone explain exactly what these errors mean, or better still how to resolve them? Apr 2 16:51:27 dell580 kernel: [ 19.831140] EXT4-fs (sdb2): re-mounted. Opts: errors=remount-ro,user_xattr,commit=0 Apr 2 16:51:27 dell580 kernel: [ 19.934194] tg3 0000:03:00.0: eth0: Link is down Apr 2 16:51:28 dell580 kernel: [ 20.929468] tg3 0000:03:00.0: eth0: Link is up at 100 Mbps, full duplex Apr 2 16:51:28 dell580 kernel: [ 20.929471] tg3 0000:03:00.0: eth0: Flow control is on for TX and on for RX Apr 2 16:51:28 dell580 kernel: [ 20.929727] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready Apr 2 16:51:29 dell580 kernel: [ 21.609381] EXT4-fs (sdb2): re-mounted. Opts: errors=remount-ro,user_xattr,commit=0 Apr 2 16:51:29 dell580 kernel: [ 21.616515] ata2.01: exception Emask 0x40 SAct 0x0 SErr 0x80800 action 0x0 Apr 2 16:51:29 dell580 kernel: [ 21.616519] ata2.01: SError: { HostInt 10B8B } Apr 2 16:51:29 dell580 kernel: [ 21.616525] ata2.00: hard resetting link Apr 2 16:51:29 dell580 kernel: [ 21.934036] ata2.01: hard resetting link Apr 2 16:51:29 dell580 kernel: [ 22.408890] ata2.00: SATA link up 1.5 Gbps (SStatus 113 SControl 300) Apr 2 16:51:29 dell580 kernel: [ 22.408907] ata2.01: SATA link up 3.0 Gbps (SStatus 123 SControl 300) Apr 2 16:51:29 dell580 kernel: [ 22.440934] ata2.00: configured for UDMA/100 Apr 2 16:51:29 dell580 kernel: [ 22.449040] ata2.01: configured for UDMA/133 Apr 2 16:51:29 dell580 kernel: [ 22.449818] ata2: EH complete Apr 2 16:51:33 dell580 kernel: [ 26.122664] ata2.01: exception Emask 0x40 SAct 0x0 SErr 0x80800 action 0x0 Apr 2 16:51:33 dell580 kernel: [ 26.122670] ata2.01: SError: { HostInt 10B8B } Apr 2 16:51:33 dell580 kernel: [ 26.122677] ata2.00: hard resetting link Apr 2 16:51:33 dell580 kernel: [ 26.442684] ata2.01: hard resetting link Apr 2 16:51:34 dell580 kernel: [ 26.925545] ata2.00: SATA link up 1.5 Gbps (SStatus 113 SControl 300) Apr 2 16:51:34 dell580 kernel: [ 26.925561] ata2.01: SATA link up 3.0 Gbps (SStatus 123 SControl 300) Apr 2 16:51:34 dell580 kernel: [ 26.961542] ata2.00: configured for UDMA/100 Apr 2 16:51:34 dell580 kernel: [ 26.969616] ata2.01: configured for UDMA/133 Apr 2 16:51:34 dell580 kernel: [ 26.970400] ata2: EH complete Apr 2 16:51:35 dell580 kernel: [ 28.111180] ata2.01: exception Emask 0x40 SAct 0x0 SErr 0x80800 action 0x0 Apr 2 16:51:35 dell580 kernel: [ 28.111184] ata2.01: SError: { HostInt 10B8B } Apr 2 16:51:35 dell580 kernel: [ 28.111191] ata2.00: hard resetting link Apr 2 16:51:35 dell580 kernel: [ 28.429674] ata2.01: hard resetting link Apr 2 16:51:36 dell580 kernel: [ 28.904557] ata2.00: SATA link up 1.5 Gbps (SStatus 113 SControl 300) Apr 2 16:51:36 dell580 kernel: [ 28.904572] ata2.01: SATA link up 3.0 Gbps (SStatus 123 SControl 300) Apr 2 16:51:36 dell580 kernel: [ 28.936609] ata2.00: configured for UDMA/100 Apr 2 16:51:36 dell580 kernel: [ 28.944692] ata2.01: configured for UDMA/133 Apr 2 16:51:36 dell580 kernel: [ 28.945464] ata2: EH complete Apr 2 16:51:38 dell580 kernel: [ 31.581756] eth0: no IPv6 routers present Apr 2 16:51:38 dell580 kernel: [ 32.103066] ata2.01: exception Emask 0x40 SAct 0x0 SErr 0x80800 action 0x0 Apr 2 16:51:38 dell580 kernel: [ 32.103074] ata2.01: SError: { HostInt 10B8B } Apr 2 16:51:38 dell580 kernel: [ 32.103085] ata2.00: hard resetting link Apr 2 16:51:38 dell580 kernel: [ 32.419669] ata2.01: hard resetting link Apr 2 16:51:39 dell580 kernel: [ 32.894518] ata2.00: SATA link up 1.5 Gbps (SStatus 113 SControl 300) Apr 2 16:51:39 dell580 kernel: [ 32.894533] ata2.01: SATA link up 3.0 Gbps (SStatus 123 SControl 300) Apr 2 16:51:39 dell580 kernel: [ 32.926536] ata2.00: configured for UDMA/100 Apr 2 16:51:39 dell580 kernel: [ 32.934715] ata2.01: configured for UDMA/133 Apr 2 16:51:39 dell580 kernel: [ 32.935578] ata2: EH complete Here's the output of smartctl for the drive. smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.0.0-17-generic] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net === START OF INFORMATION SECTION === Model Family: SAMSUNG SpinPoint F1 DT Device Model: SAMSUNG HD103UJ Serial Number: S13PJ90QC19706 LU WWN Device Id: 5 0000f0 00b1c7960 Firmware Version: 1AA01113 User Capacity: 1,000,204,886,016 bytes [1.00 TB] Sector Size: 512 bytes logical/physical Device is: In smartctl database [for details use: -P show] ATA Version is: 8 ATA Standard is: ATA-8-ACS revision 3b Local Time is: Mon Apr 2 17:13:48 2012 BST SMART support is: Available - device has SMART capability. SMART support is: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED General SMART Values: Offline data collection status: (0x00) Offline data collection activity was never started. Auto Offline Data Collection: Disabled. Self-test execution status: ( 41) The self-test routine was interrupted by the host with a hard or soft reset. Total time to complete Offline data collection: (11772) seconds. Offline data collection capabilities: (0x7b) SMART execute Offline immediate. Auto Offline data collection on/off support. Suspend Offline collection upon new command. Offline surface scan supported. Self-test supported. Conveyance Self-test supported. Selective Self-test supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x01) Error logging supported. General Purpose Logging supported. Short self-test routine recommended polling time: ( 2) minutes. Extended self-test routine recommended polling time: ( 197) minutes. Conveyance self-test routine recommended polling time: ( 21) minutes. SCT capabilities: (0x003f) SCT Status supported. SCT Error Recovery Control supported. SCT Feature Control supported. SCT Data Table supported. SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000f 100 100 051 Pre-fail Always - 0 3 Spin_Up_Time 0x0007 076 076 011 Pre-fail Always - 7940 4 Start_Stop_Count 0x0032 099 099 000 Old_age Always - 521 5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0 7 Seek_Error_Rate 0x000f 253 253 051 Pre-fail Always - 0 8 Seek_Time_Performance 0x0025 100 100 015 Pre-fail Offline - 0 9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 642 10 Spin_Retry_Count 0x0033 100 100 051 Pre-fail Always - 0 11 Calibration_Retry_Count 0x0012 100 100 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 482 13 Read_Soft_Error_Rate 0x000e 100 100 000 Old_age Always - 0 183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 759 184 End-to-End_Error 0x0033 100 100 000 Pre-fail Always - 0 187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0 188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0022 073 069 000 Old_age Always - 27 (Min/Max 16/27) 194 Temperature_Celsius 0x0022 073 067 000 Old_age Always - 27 (Min/Max 16/28) 195 Hardware_ECC_Recovered 0x001a 100 100 000 Old_age Always - 320028 196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0030 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 099 099 000 Old_age Always - 1494 200 Multi_Zone_Error_Rate 0x000a 100 100 000 Old_age Always - 0 201 Soft_Read_Error_Rate 0x000a 253 253 000 Old_age Always - 0 SMART Error Log Version: 1 ATA Error Count: 211 (device log contains only the most recent five errors) CR = Command Register [HEX] FR = Features Register [HEX] SC = Sector Count Register [HEX] SN = Sector Number Register [HEX] CL = Cylinder Low Register [HEX] CH = Cylinder High Register [HEX] DH = Device/Head Register [HEX] DC = Device Command Register [HEX] ER = Error register [HEX] ST = Status register [HEX] Powered_Up_Time is measured from power on, and printed as DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes, SS=sec, and sss=millisec. It "wraps" after 49.710 days. Error 211 occurred at disk power-on lifetime: 0 hours (0 days + 0 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 84 51 0f 31 63 8f e1 Error: ICRC, ABRT 15 sectors at LBA = 0x018f6331 = 26174257 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 00 00 40 62 8f e1 08 00:01:00.460 READ DMA c8 00 20 00 7c 30 e0 08 00:01:00.450 READ DMA c8 00 00 10 49 8f e1 08 00:01:00.440 READ DMA c8 00 e0 20 d0 30 e0 08 00:01:00.420 READ DMA c8 00 00 c0 59 90 e1 08 00:01:00.400 READ DMA Error 210 occurred at disk power-on lifetime: 0 hours (0 days + 0 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 84 51 cf e9 cf 66 e0 Error: ICRC, ABRT 207 sectors at LBA = 0x0066cfe9 = 6737897 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 00 00 b8 cf 66 e0 08 00:08:29.780 READ DMA c8 00 60 60 c9 18 e0 08 00:08:29.770 READ DMA c8 00 40 20 c9 18 e0 08 00:08:29.770 READ DMA c8 00 20 00 c9 18 e0 08 00:08:29.760 READ DMA c8 00 20 98 cf 66 e0 08 00:08:29.750 READ DMA Error 209 occurred at disk power-on lifetime: 0 hours (0 days + 0 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 84 51 2f d1 74 e0 e0 Error: ICRC, ABRT 47 sectors at LBA = 0x00e074d1 = 14709969 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 00 00 00 74 e0 e0 08 00:00:30.940 READ DMA c8 00 20 18 36 de e0 08 00:00:30.930 READ DMA c8 00 08 48 f1 dd e0 08 00:00:30.930 READ DMA c8 00 08 a8 f0 dd e0 08 00:00:30.930 READ DMA c8 00 08 90 f0 dd e0 08 00:00:30.930 READ DMA Error 208 occurred at disk power-on lifetime: 0 hours (0 days + 0 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 84 51 7f 21 88 9d e0 Error: ICRC, ABRT 127 sectors at LBA = 0x009d8821 = 10324001 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 00 a0 00 88 9d e0 08 00:00:27.610 READ DMA c8 00 58 a8 e7 9c e0 08 00:00:27.610 READ DMA c8 00 00 28 e6 9c e0 08 00:00:27.610 READ DMA c8 00 00 e0 e4 9c e0 08 00:00:27.610 READ DMA c8 00 00 90 e0 9c e0 08 00:00:27.600 READ DMA Error 207 occurred at disk power-on lifetime: 0 hours (0 days + 0 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 04 51 26 6a 6a c3 e0 Error: ABRT at LBA = 0x00c36a6a = 12806762 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- ca 00 00 90 69 c3 e0 08 00:29:39.350 WRITE DMA ca 00 40 90 68 c3 e0 08 00:29:39.350 WRITE DMA ca 00 40 50 65 c3 e0 08 00:29:39.350 WRITE DMA ca 00 40 d0 64 c3 e0 08 00:29:39.350 WRITE DMA ca 00 40 90 63 c3 e0 08 00:29:39.350 WRITE DMA SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Short offline Interrupted (host reset) 90% 638 - # 2 Short offline Interrupted (host reset) 90% 638 - # 3 Extended offline Interrupted (host reset) 90% 638 - # 4 Short offline Interrupted (host reset) 90% 638 - # 5 Extended offline Interrupted (host reset) 90% 638 - SMART Selective self-test log data structure revision number 1 SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS 1 0 0 Not_testing 2 0 0 Not_testing 3 0 0 Not_testing 4 0 0 Not_testing 5 0 0 Not_testing Selective self-test flags (0x0): After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay.

    Read the article

  • Fan running constantly on a Dell D420 laptop

    - by Halik
    I'm running latest Ubuntu 12.04 beta on a Dell D420 laptop. The fan is spinning almost constantly - even after turning the PC off, letting it cool down, and then turning it back on, the fan will turn on after some idle time. Not to mention any CPU work. The CPU temps are normal, in range of 50-55 idle, and up to 70 with some load. It wouldn't be an issue, but the same PC running Fedora, or Arch Linux, had a much more modest fan profile - the temps were managed while you seldom heard the fan. To counter the problem, I currently use i8k tools, set manual temperature thresholds which seemed to have worked, but the i8kmon has a tendency to cycle the fan between lower and higher state within aboutin a second intervals - which is extremely annoying. As far as I can tell I did not run any special software (beside laptop-mode-tools), or any additional kernel modules when running Arch Linux and I can't tell about Fedora.

    Read the article

  • My sound stopped working today, how can I fix it?

    - by Oli
    This seems to be a problem with pulseaudio. I was logged in over VNC on my phone and started playing a video this caused X to crash (as sometimes happens). I restarted and suddenly the sound doesn't work. I have a Intel HDA/Realtek ALC889 00:1b.0 Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio Controller alsamixer is detecting this just fine. PulseAudio doesn't detect this alsa device so is using auto_null as the default sink (logs below). When I properly kill PulseAudio (tell it not to auto-start) direct ALSA communication with the sound card works just fine. speaker-test, for example, works. So the hardware and ALSA layers are fine IMO. In the logs, it seems that the card might be "busy" but I really don't know how or why it would be now (and never before). Is there an ALSA lock file somewhere that it still there because of my crash? I just ran sudo fuser /dev/snd/* and saw this: oli@bert:~$ sudo fuser /dev/snd/* /dev/snd/controlC0: 1884 /dev/snd/pcmC0D0c: 1884m /dev/snd/timer: 1884 A look at the process list (ps aux | grep 1884) tells me process 1884 is arecord -c 1 -f S16_LE -r 8000 -t raw. No idea what this is or why it's running. When I try and kill arecord (as root), it just respawns and rebinds on the hardware. I'm in a very annoying situation where I don't know what is going on and don't know how to find out. I'm open to all suggestions to get this working again. Fire away. And here's what I get when I stop PA auto-loading, kill it and then start it with -vvvv. oli@bert:~$ pulseaudio -vvvvv I: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted I: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted D: core-rtclock.c: Timer slack is set to 50 us. D: core-util.c: RealtimeKit worked. I: core-util.c: Successfully gained nice level -11. I: main.c: This is PulseAudio 0.9.21-63-gd3efa-dirty D: main.c: Compilation host: x86_64-pc-linux-gnu D: main.c: Compilation CFLAGS: -g -O2 -g -Wall -O3 -Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option D: main.c: Running on host: Linux x86_64 2.6.38-rc3 #1 SMP Tue Feb 1 10:53:04 GMT 2011 D: main.c: Found 8 CPUs. I: main.c: Page size is 4096 bytes D: main.c: Compiled with Valgrind support: no D: main.c: Running in valgrind mode: no D: main.c: Running in VM: no D: main.c: Optimised build: yes D: main.c: All asserts enabled. I: main.c: Machine ID is 8310740c4729ef474fe5ecec4bbf5a6b. I: main.c: Session ID is 8310740c4729ef474fe5ecec4bbf5a6b-1297338553.571075-1050119523. I: main.c: Using runtime directory /home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-runtime. I: main.c: Using state directory /home/oli/.pulse. I: main.c: Using modules directory /usr/lib/pulse-0.9.21/modules. I: main.c: Running in system mode: no I: main.c: Fresh high-resolution timers available! Enjoy ol' chap! I: cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 I: svolume_mmx.c: Initialising MMX optimized functions. I: remap_mmx.c: Initialising MMX optimized remappers. I: svolume_sse.c: Initialising SSE2 optimized functions. I: remap_sse.c: Initialising SSE2 optimized remappers. I: sconv_sse.c: Initialising SSE2 optimized conversions. D: memblock.c: Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472 D: database-tdb.c: Opened TDB database '/home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-device-volumes.tdb' I: module-device-restore.c: Sucessfully opened database file '/home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-device-volumes'. I: module.c: Loaded "module-device-restore" (index: #0; argument: ""). D: database-tdb.c: Opened TDB database '/home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-stream-volumes.tdb' I: module-stream-restore.c: Sucessfully opened database file '/home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-stream-volumes'. I: module.c: Loaded "module-stream-restore" (index: #1; argument: ""). D: database-tdb.c: Opened TDB database '/home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-card-database.tdb' I: module-card-restore.c: Sucessfully opened database file '/home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-card-database'. I: module.c: Loaded "module-card-restore" (index: #2; argument: ""). I: module.c: Loaded "module-augment-properties" (index: #3; argument: ""). D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-udev-detect.so': success D: module-udev-detect.c: /dev/snd/controlC0 is accessible: yes D: module-udev-detect.c: /devices/pci0000:00/0000:00:1b.0/sound/card0 is busy: yes I: module-udev-detect.c: Found 1 cards. I: module.c: Loaded "module-udev-detect" (index: #4; argument: ""). D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-bluetooth-discover.so': success D: dbus-util.c: Successfully connected to D-Bus system bus ba7c9a1f90b3d49d930bca2100000015 as :1.62 D: bluetooth-util.c: dbus: interface=org.freedesktop.DBus, path=/org/freedesktop/DBus, member=NameAcquired D: bluetooth-util.c: Bluetooth daemon is apparently not available. I: module.c: Loaded "module-bluetooth-discover" (index: #5; argument: ""). D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-esound-protocol-unix.so': success I: module.c: Loaded "module-esound-protocol-unix" (index: #6; argument: ""). I: module.c: Loaded "module-native-protocol-unix" (index: #7; argument: ""). D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-gconf.so': success I: module.c: Loaded "module-gconf" (index: #8; argument: ""). I: module-default-device-restore.c: Saved default sink 'auto_null' not existant, not restoring default sink setting. I: module-default-device-restore.c: Saved default source 'auto_null.monitor' not existant, not restoring default source setting. I: module.c: Loaded "module-default-device-restore" (index: #9; argument: ""). I: module.c: Loaded "module-rescue-streams" (index: #10; argument: ""). D: module-always-sink.c: Autoloading null-sink as no other sinks detected. I: sink.c: Created sink 0 "auto_null" with sample spec s16le 6ch 44100Hz and channel map front-left,front-left-of-center,front-center,front-right,front-right-of-center,rear-center I: sink.c: device.description = "Dummy Output" I: sink.c: device.class = "abstract" I: sink.c: device.icon_name = "audio-card" D: core-subscribe.c: Dropped redundant event due to change event. I: source.c: Created source 0 "auto_null.monitor" with sample spec s16le 6ch 44100Hz and channel map front-left,front-left-of-center,front-center,front-right,front-right-of-center,rear-center I: source.c: device.description = "Monitor of Dummy Output" I: source.c: device.class = "monitor" I: source.c: device.icon_name = "audio-input-microphone" D: module-null-sink.c: Thread starting up I: module.c: Loaded "module-null-sink" (index: #11; argument: "sink_name=auto_null sink_properties='device.description="Dummy Output"'"). I: module.c: Loaded "module-always-sink" (index: #12; argument: ""). I: module.c: Loaded "module-intended-roles" (index: #13; argument: ""). D: module-suspend-on-idle.c: Sink auto_null becomes idle, timeout in 5 seconds. I: module.c: Loaded "module-suspend-on-idle" (index: #14; argument: ""). I: client.c: Created 0 "ConsoleKit Session /org/freedesktop/ConsoleKit/Session1" D: module-console-kit.c: Added new session /org/freedesktop/ConsoleKit/Session1 I: module.c: Loaded "module-console-kit" (index: #15; argument: ""). I: module.c: Loaded "module-position-event-sounds" (index: #16; argument: ""). D: dbus-util.c: Successfully connected to D-Bus session bus efbffc6788fad56cfd64d40c00000018 as :1.182 D: main.c: Got org.pulseaudio.Server! I: main.c: Daemon startup complete. I: client.c: Created 1 "Native client (UNIX socket client)" I: client.c: Created 2 "Native client (UNIX socket client)" D: protocol-native.c: Protocol version: remote 16, local 16 I: protocol-native.c: Got credentials: uid=1000 gid=1000 success=1 D: protocol-native.c: SHM possible: yes D: protocol-native.c: Negotiated SHM: yes D: protocol-native.c: Protocol version: remote 16, local 16 I: protocol-native.c: Got credentials: uid=1000 gid=1000 success=1 D: protocol-native.c: SHM possible: yes D: protocol-native.c: Negotiated SHM: yes D: module-augment-properties.c: Looking for .desktop file for gnome-volume-control-applet D: module-augment-properties.c: Looking for .desktop file for gnome-settings-daemon D: core-subscribe.c: Dropped redundant event due to change event. I: module-suspend-on-idle.c: Sink auto_null idle for too long, suspending ... D: sink.c: Suspend cause of sink auto_null is 0x0004, suspending Note the one section that seems to find the hardware but says it's busy (no idea if this is relevant). D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-udev-detect.so': success D: module-udev-detect.c: /dev/snd/controlC0 is accessible: yes D: module-udev-detect.c: /devices/pci0000:00/0000:00:1b.0/sound/card0 is busy: yes I: module-udev-detect.c: Found 1 cards.

    Read the article

  • ubuntu cant be installed as it says GPU lock

    - by piyush bhardwaj
    i have win 7 running on my system i just wanna move to ubuntu 12.10 desktop version 36 bit but when i try to install the CD gets loaded start screen comes but suddenly texts line appears and screen goes black the text are - [189.463934] [drm] [noveau] 0000:02:00.0: GPU LOCK- switching to software fbcon [194.248014] [drm] [noveau] 0000:02:00.0: failed to idle channel 1 [199.504009] [drm] [noveau] 0000:02:00.0: failed to idle channel 3 and it goes on.....like this iam new to the linux system so dnt know much abt it ..so if any body can help me to solve my prblm.. my laptop is of HCL and it has 3 gb ram or 350 gb hard disk with nvidia graphic card ..it has 2 ghz pentium dual core it was manufactured in 2009.. so if any body can help i would be greatful and can be able to join ubuntu..

    Read the article

  • A good way to build a game loop in OpenGL

    - by Jeff
    I'm currently beginning to learn OpenGL at school, and I've started making a simple game the other day (on my own, not for school). I'm using freeglut, and am building it in C, so for my game loop I had really just been using a function I made passed to glutIdleFunc to update all the drawing and physics in one pass. This was fine for simple animations that I didn't care too much about the frame rate, but since the game is mostly physics based, I really want to (need to) tie down how fast it's updating. So my first attempt was to have my function I pass to glutIdleFunc (myIdle()) to keep track of how much time has passed since the previous call to it, and update the physics (and currently graphics) every so many milliseconds. I used timeGetTime() to do this (by using <windows.h>). And this got me to thinking, is using the idle function really a good way of going about the game loop? My question is, what is a better way to implement the game loop in OpenGL? Should I avoid using the idle function?

    Read the article

  • CPU temperature is high on Ubuntu

    - by Kaspar
    So I have a machine which has both latest *Ubuntu and Windows 8 on it. On windows 8 my CPU temp is roughtly 26 degrees when idle. Now when I boot into Ubuntu, CPU temperature is suddenly 43 degrees when idle, plus my fans are making a lot of noise which is probably because of the CPU degrees. Why is that? Everywhere I read it says the Linux is much better at managing CPU and so on. But yet it seems something is wrong. It is a stock installation of Ubuntu 14.04 and my CPU is a Intel i5-4570

    Read the article

  • Ubuntu 12.10 Laptop temperature

    - by romi
    I'm using a laptop having dedicated graphics card with Ubuntu and Windows 7 dual boot. The windows 7 idle temperature for cpu is 51C average and gpu is 46-48.5C, and when in load Cpu temp varies between 55-61C, and GPU 49-51 MAX. But in ubuntu idle temp CPU: 54c Gpu(ati radeon,proprietary driver installed): 50C and on load cpu: 58-69C gpu:53C max. Is it normal? If not is there any solution? Note that i'm using jupiter,latest graphics driver, grub tweaks etc.

    Read the article

  • Xubuntu fails to stay awake when the machine is under load

    - by Alex
    I have the following problem with a fresh install of Xubuntu 12.04: I set up power management options so as to send the machine to sleep after it's been idle for a while. My intention was to have it finish some lengthy numbercrunching and then fall asleep late at night when nobody's present to shut it down. What actually happened, however, is that the machine goes to sleep whenever the desktop session has been idle for the specified amount of time, and it does not seem to care at all about CPU load, and I had to disable sleep altogether. Is there any way to fix this?

    Read the article

  • Google Analytics w3wp.exe?

    - by s15199d
    In this link Google defines a Visit. The key part that interests me now, is this: "If a user is inactive on your site for 30 minutes or more, any future activity will be attributed to a new session." Would an idle user (e.g. an employee whose PC is left on over the weekend) record "activity" as a result of the w3wp.exe process recycling? Our site caching model refreshes every 30 minutes. Could this trigger "activity" for an idle user? I've asked this on the Google Analytics forum a week ago and no response.

    Read the article

  • Converting Lighttpd config to NginX with php-fpm

    - by Le Dude
    Having so much issue with NginX configuration since I'm new with NginX. Been using Lighttpd for quite sometime. Here are the base info. New Machine - CentOS 6.3 64 Bit - NginX 1.2.4-1.e16.ngx - Php-FPM 5.3.18-1.e16.remi Old Machine - CentOS 6.2 64Bit - Lighttpd 1.4.25-3.e16 Original Lighttpd config file: ####################################################################### ## ## /etc/lighttpd/lighttpd.conf ## ## check /etc/lighttpd/conf.d/*.conf for the configuration of modules. ## ####################################################################### ####################################################################### ## ## Some Variable definition which will make chrooting easier. ## ## if you add a variable here. Add the corresponding variable in the ## chroot example aswell. ## var.log_root = "/var/log/lighttpd" var.server_root = "/var/www" var.state_dir = "/var/run" var.home_dir = "/var/lib/lighttpd" var.conf_dir = "/etc/lighttpd" ## ## run the server chrooted. ## ## This requires root permissions during startup. ## ## If you run Chrooted set the the variables to directories relative to ## the chroot dir. ## ## example chroot configuration: ## #var.log_root = "/logs" #var.server_root = "/" #var.state_dir = "/run" #var.home_dir = "/lib/lighttpd" #var.vhosts_dir = "/vhosts" #var.conf_dir = "/etc" # #server.chroot = "/srv/www" ## ## Some additional variables to make the configuration easier ## ## ## Base directory for all virtual hosts ## ## used in: ## conf.d/evhost.conf ## conf.d/simple_vhost.conf ## vhosts.d/vhosts.template ## var.vhosts_dir = server_root + "/vhosts" ## ## Cache for mod_compress ## ## used in: ## conf.d/compress.conf ## var.cache_dir = "/var/cache/lighttpd" ## ## Base directory for sockets. ## ## used in: ## conf.d/fastcgi.conf ## conf.d/scgi.conf ## var.socket_dir = home_dir + "/sockets" ## ####################################################################### ####################################################################### ## ## Load the modules. include "modules.conf" ## ####################################################################### ####################################################################### ## ## Basic Configuration ## --------------------- ## server.port = 80 ## ## Use IPv6? ## #server.use-ipv6 = "enable" ## ## bind to a specific IP ## #server.bind = "localhost" ## ## Run as a different username/groupname. ## This requires root permissions during startup. ## server.username = "lighttpd" server.groupname = "lighttpd" ## ## enable core files. ## #server.core-files = "disable" ## ## Document root ## server.document-root = server_root + "/lighttpd" ## ## The value for the "Server:" response field. ## ## It would be nice to keep it at "lighttpd". ## #server.tag = "lighttpd" ## ## store a pid file ## server.pid-file = state_dir + "/lighttpd.pid" ## ####################################################################### ####################################################################### ## ## Logging Options ## ------------------ ## ## all logging options can be overwritten per vhost. ## ## Path to the error log file ## server.errorlog = log_root + "/error.log" ## ## If you want to log to syslog you have to unset the ## server.errorlog setting and uncomment the next line. ## #server.errorlog-use-syslog = "enable" ## ## Access log config ## include "conf.d/access_log.conf" ## ## The debug options are moved into their own file. ## see conf.d/debug.conf for various options for request debugging. ## include "conf.d/debug.conf" ## ####################################################################### ####################################################################### ## ## Tuning/Performance ## -------------------- ## ## corresponding documentation: ## http://www.lighttpd.net/documentation/performance.html ## ## set the event-handler (read the performance section in the manual) ## ## possible options on linux are: ## ## select ## poll ## linux-sysepoll ## ## linux-sysepoll is recommended on kernel 2.6. ## server.event-handler = "linux-sysepoll" ## ## The basic network interface for all platforms at the syscalls read() ## and write(). Every modern OS provides its own syscall to help network ## servers transfer files as fast as possible ## ## linux-sendfile - is recommended for small files. ## writev - is recommended for sending many large files ## server.network-backend = "linux-sendfile" ## ## As lighttpd is a single-threaded server, its main resource limit is ## the number of file descriptors, which is set to 1024 by default (on ## most systems). ## ## If you are running a high-traffic site you might want to increase this ## limit by setting server.max-fds. ## ## Changing this setting requires root permissions on startup. see ## server.username/server.groupname. ## ## By default lighttpd would not change the operation system default. ## But setting it to 2048 is a better default for busy servers. ## ## With SELinux enabled, this is denied by default and needs to be allowed ## by running the following once : setsebool -P httpd_setrlimit on server.max-fds = 2048 ## ## Stat() call caching. ## ## lighttpd can utilize FAM/Gamin to cache stat call. ## ## possible values are: ## disable, simple or fam. ## server.stat-cache-engine = "simple" ## ## Fine tuning for the request handling ## ## max-connections == max-fds/2 (maybe /3) ## means the other file handles are used for fastcgi/files ## server.max-connections = 1024 ## ## How many seconds to keep a keep-alive connection open, ## until we consider it idle. ## ## Default: 5 ## #server.max-keep-alive-idle = 5 ## ## How many keep-alive requests until closing the connection. ## ## Default: 16 ## #server.max-keep-alive-requests = 18 ## ## Maximum size of a request in kilobytes. ## By default it is unlimited (0). ## ## Uploads to your server cant be larger than this value. ## #server.max-request-size = 0 ## ## Time to read from a socket before we consider it idle. ## ## Default: 60 ## #server.max-read-idle = 60 ## ## Time to write to a socket before we consider it idle. ## ## Default: 360 ## #server.max-write-idle = 360 ## ## Traffic Shaping ## ----------------- ## ## see /usr/share/doc/lighttpd/traffic-shaping.txt ## ## Values are in kilobyte per second. ## ## Keep in mind that a limit below 32kB/s might actually limit the ## traffic to 32kB/s. This is caused by the size of the TCP send ## buffer. ## ## per server: ## #server.kbytes-per-second = 128 ## ## per connection: ## #connection.kbytes-per-second = 32 ## ####################################################################### ####################################################################### ## ## Filename/File handling ## ------------------------ ## ## files to check for if .../ is requested ## index-file.names = ( "index.php", "index.rb", "index.html", ## "index.htm", "default.htm" ) ## index-file.names += ( "index.xhtml", "index.html", "index.htm", "default.htm", "index.php" ) ## ## deny access the file-extensions ## ## ~ is for backupfiles from vi, emacs, joe, ... ## .inc is often used for code includes which should in general not be part ## of the document-root url.access-deny = ( "~", ".inc" ) ## ## disable range requests for pdf files ## workaround for a bug in the Acrobat Reader plugin. ## $HTTP["url"] =~ "\.pdf$" { server.range-requests = "disable" } ## ## url handling modules (rewrite, redirect) ## #url.rewrite = ( "^/$" => "/server-status" ) #url.redirect = ( "^/wishlist/(.+)" => "http://www.example.com/$1" ) ## ## both rewrite/redirect support back reference to regex conditional using %n ## #$HTTP["host"] =~ "^www\.(.*)" { # url.redirect = ( "^/(.*)" => "http://%1/$1" ) #} ## ## which extensions should not be handle via static-file transfer ## ## .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi ## static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" ) ## ## error-handler for status 404 ## #server.error-handler-404 = "/error-handler.html" #server.error-handler-404 = "/error-handler.php" ## ## Format: <errorfile-prefix><status-code>.html ## -> ..../status-404.html for 'File not found' ## #server.errorfile-prefix = "/srv/www/htdocs/errors/status-" ## ## mimetype mapping ## include "conf.d/mime.conf" ## ## directory listing configuration ## include "conf.d/dirlisting.conf" ## ## Should lighttpd follow symlinks? ## server.follow-symlink = "enable" ## ## force all filenames to be lowercase? ## #server.force-lowercase-filenames = "disable" ## ## defaults to /var/tmp as we assume it is a local harddisk ## server.upload-dirs = ( "/var/tmp" ) ## ####################################################################### ####################################################################### ## ## SSL Support ## ------------- ## ## To enable SSL for the whole server you have to provide a valid ## certificate and have to enable the SSL engine.:: ## ## ssl.engine = "enable" ## ssl.pemfile = "/path/to/server.pem" ## ## The HTTPS protocol does not allow you to use name-based virtual ## hosting with SSL. If you want to run multiple SSL servers with ## one lighttpd instance you must use IP-based virtual hosting: :: ## ## $SERVER["socket"] == "10.0.0.1:443" { ## ssl.engine = "enable" ## ssl.pemfile = "/etc/ssl/private/www.example.com.pem" ## server.name = "www.example.com" ## ## server.document-root = "/srv/www/vhosts/example.com/www/" ## } ## ## If you have a .crt and a .key file, cat them together into a ## single PEM file: ## $ cat /etc/ssl/private/lighttpd.key /etc/ssl/certs/lighttpd.crt \ ## > /etc/ssl/private/lighttpd.pem ## #ssl.pemfile = "/etc/ssl/private/lighttpd.pem" ## ## optionally pass the CA certificate here. ## ## #ssl.ca-file = "" ## ####################################################################### ####################################################################### ## ## custom includes like vhosts. ## #include "conf.d/config.conf" #include_shell "cat /etc/lighttpd/vhosts.d/*.conf" ## ####################################################################### ####################################################################### ### Custom Added by me #url.rewrite-once = (".*\.(js|ico|gif|jpg|png|css|jar|class)$" => "$0", "" => "/index.php") url.rewrite-once = ( ".*\?(.*)$" => "/index.php?$1", "^/js/.*$" => "$0", "^.*\.(js|ico|gif|jpg|png|css|swf |jar|class)$" => "$0", "" => "/index.php" ) # expire.url = ( "" => "access 1 days" ) include "myvhost-vhosts.conf" ####################################################################### Here is my Vhost file for lighttpd $HTTP["host"] =~ "192.168.8.35$" { server.document-root = "/var/www/lighttpd/qc41022012/public" server.errorlog = "/var/log/lighttpd/error.log" accesslog.filename = "/var/log/lighttpd/access.log" server.error-handler-404 = "/e404.php" } and here is my nginx.conf file user nginx; worker_processes 5; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/testsite/logs/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; # include /etc/nginx/conf.d/*.conf; ## I added this ## include /etc/nginx/sites-available/*; } Here is my NginX Vhost file server { server_name 192.168.8.91; access_log /var/log/nginx/myapps/logs/access.log; error_log /var/log/nginx/myapps/logs/error.log; root /var/www/html/myapps/public; location / { index index.html index.htm index.php; } location = /favicon.ico { return 204; access_log off; log_not_found off; } # location ~ \.php$ { # try_files $uri /index.php; # include /etc/nginx/fastcgi_params; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # fastcgi_param SCRIPT_NAME $fastcgi_script_name; location ~ \.php.*$ { rewrite ^(.*.php)/ $1 last; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # fastcgi_intercept_errors on; # fastcgi_param SCRIPT_FILENAME $document_root/index.php; # fastcgi_param PATH_INFO $uri; # fastcgi_pass 127.0.0.1:9000; # include fastcgi_params; } } We have a custom apps that we created that works great with lighttpd. I went through some headache also when we were trying to figure out how to make it work with lighttpd. this is the line that helps make it work in lighttpd. url.rewrite-once = ( ".*\?(.*)$" => "/index.php?$1", "^/js/.*$" => "$0", "^.*\.(js|ico|gif|jpg|png|css|swf |jar|class)$" => "$0", "" => "/index.php" ) but I couldn't figure out how to make it works in NginX. The webserver run just fine when we use the phpinfo.php test file. However as soon as I point it to my apps, nothing comes up. Check the error.log file and there's no error. Very mind boggling. I spent over 1 week trying to figure it out with no luck.. Please help?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >