![]() Type usplash_write >/dev/null 2>/dev/null & usplash_write "TIMEOUT 15" || true Type usplash_write >/dev/null 2>/dev/null & usplash_write "TIMEOUT 120" || true Log_action_begin_msg "Configuring network interfaces" Log_action_end_msg $? fi fi type usplash_write >/dev /null 2 >/dev /null & usplash_write "TIMEOUT 15" || true Log_action_end_msg $? fi else if ifup -a >/dev /null 2 >& 1 then Log_action_begin_msg "Configuring network interfaces" type usplash_write >/dev /null 2 >/dev /null & usplash_write "TIMEOUT 120" || true if then if ifup -a then Extract “start” case into a separate method: init.d/networkingįOUND IT: In this case the netwoking script that runs on startup is “./init.d/networking” network /if-down.d /clamav-freshclam-ifupdown ![]() network /if-up.d /clamav-freshclam-ifupdown Here are two easy steps on howto archive this in Ubuntu (it can be applied to pretty much any Linux/Unix distribution, however the scrips/locations will/might be different) : One thing to understand here, is that networking is not taken out of the boot process – it stills belongs to it (it is its child), and it would still run, and would do its important job – the difference is it would do it in parallel. This will speed up boot time, since the system should no longer wait on the “networking” to finish. So instead of all other boot scripts to wait on the networking script(s) to finish its discovering and “timeouting” during a system boot, these network script(s) could be started in parallel, as separate child processes. The idea to solve this is simply to take an advantage of concurrency. This of course can be solved with tweaking the timeout or just configuring a static IP, however this solution is not all that elegant, just because “What if the system needs this particular timeout?” or “What if it is a laptop, and it’s IP cannot be static?” LANG=en_US.UTF-8PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binHOME=/home/dhisLOGNAME=dhisUSER=dhisSHELL=/bin/falseINVOCATION_ID=640ed00bfbd74a5683f90c7b452ad90cJOURNAL_STREAM=9:21790CATALINA_HOME=/usr/share/tomcat8CATALINA_BASE=/home/dhis/tomcat-dhisCATALINA_TMPDIR=/home/dhis/tomcat-dhis/tempJAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64JAVA_OPTS=-Xmx7500m -Xms4000m =2048 = .SecurityListener.UMASK=0027JDK_JAVA_OPTIONS=-add-opens=java.base/java.lang=ALL-UNNAMED -add-opens=java.base/java.io=ALL-UNNAMED -add-opens=java.rmi/=ALL-UNNAMEDJAVA_ENDORSED_DIRS=CLASSPATH=/usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.It is quite a simple change but it makes an Ubuntu laptop to boot 2-3 times faster! What takes the most time during boot in Ubuntu (and many other Linux distros) are DHCP discovery and DHCP timeout that are run by networking startup scripts. PS for anyone else trying to do something similar with a different setup, you can find out Java options etc by examining the Java process (use ps to find the process id first - in this case 863), e.g.: ps aux|grep javaĭhis 863 49.0 14.7 9767836 1774036 ? Ssl 00:45 1:15 /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xmx7500m -Xms4000m =2048 = .SecurityListener.UMASK=0027 -classpath /usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jar -Dcatalina.base=/home/dhis/tomcat-dhis =/usr/share/tomcat8 = -Djava.io.tmpdir=/home/dhis/tomcat-dhis/temp .file=/home/dhis/tomcat-dhis/conf/logging.properties = .Bootstrap start ![]() JDK_JAVA_OPTIONS= -add-opens=java.base/java.lang=ALL-UNNAMED -add-opens=java.base/java.io=ALL-UNNAMED -add-opens=java.rmi/=ALL-UNNAMEDĬLASSPATH=/usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jarĪnd it DHIS 2 now starts up automatically after reboot and seems to function correctly. JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 ![]() = \Īnd a settings file ( /etc/default/tomcat) with the following: CATALINA_HOME=/usr/share/tomcat8ĬATALINA_TMPDIR=/home/dhis/tomcat-dhis/temp I have created a file ( /lib/systemd/system/rvice) with the following: ĭescription=Apache Tomcat Web Application ContainerĮxecStart=/usr/bin/env $/conf/logging.properties \ ĭoes 18.04 use systemd instead by default? I couldn’t get DHIS 2 (v 2.30 with OpenJDK) to reboot on Ubuntu 18.04 after power outages using the instructions here. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |