Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System properties management

Tags:

jenkins

Is there any "adequate" way to change system properties in Jenkins? What is the easiest/fastest way change them? For instance, I need to turn off the useless (in my case) pinging thread.

like image 345
Zloj Avatar asked Apr 09 '15 13:04

Zloj


People also ask

What are system properties?

System properties include information about the current user, the current version of the Java runtime, and the character used to separate components of a file path name. The following table describes some of the most important system properties. Key. Meaning.

What are the functions of a property management system?

A property management system (PMS) is software that facilitates a hotel's reservation management and administrative tasks. The most important functions include front-desk operations, reservations, channel management, housekeeping, rate and occupancy management, and payment processing.

How do you create a system property?

Navigate to System Definition > Application Menus. Search for the application you want to add the properties table to, for example System Properties. Select an application that is restricted to the admin role so that non-admin users cannot access it. From the Modules related list, click New.

Where and how you can use property management system and why are these useful?

A property management system is a hotel software solution, which assists hotels, resorts and similar properties with day-to-day tasks and operations. These will typically include management and administrative tasks, with examples including reservations, payment processing, performance analysis and inventory management.


2 Answers

If you really want a quick and simple way to change a system property, you can use the script console

System.setProperty("hudson.remoting.Launcher.pingIntervalSec", 0) 

But that won't survive a restart. To make it permanent, add the setting to the java args. For me (CentOS, Jenkins 2.7.1) that's a line about halfway down /etc/sysconfig/jenkins (for other distributions I believe it's /etc/default/jenkins) where you should add your option to the existing list like this:

JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.remoting.Launcher.pingIntervalSec=0" 

You'll have to restart Jenkins after you make that change (thanks Mark Tickner)

like image 101
andrew lorien Avatar answered Sep 21 '22 12:09

andrew lorien


If you run Jenkins on windows as a service without tomcat, you can edit jenkins.xml. Add the property in <service><arguments> before the -jar. Than restart the service.

<service>     <!-- ... -->     <arguments>-Xrs -Xmx256m  -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle  -Dhudson.tasks.MailSender.SEND_TO_UNKNOWN_USERS=true  -Dhudson.tasks.MailSender.SEND_TO_USERS_WITHOUT_READ=true  -jar "%BASE%\jenkins.war" --httpPort=8080 --webroot="%BASE%\war"</arguments> 
like image 24
Stefan Bormann Avatar answered Sep 19 '22 12:09

Stefan Bormann