Process mask for minecraft

Asked by Peter

Hi,

I am trying to add minecraft process to Playtime activities. It's a Java application and the process command line looks something like this:
/usr/lib/jvm/java-11-openjdk-amd64/bin/java -Xss1M -Djava.library.path=/home/username/.minecraft/bin/34c3-7634-d345-876af -Dminecraft.launcher.brand=minecraft-launcher -Dminecraft.launcher.version=2.1.17417 -cp [CUT]

I've tried a Regexp like "java.*minecraft" however this doesn't seem to work. I have the impression that timekpr only looks at the program path and doesn't consider the full command line. This means that java processes cannot be distinguished.

Is there a way to achieve what I want?

Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
Timekpr-nExT Edit question
Assignee:
Eduards Bezverhijs Edit question
Solved by:
Peter
Solved:
Last query:
Last reply:
Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#1

You're right, it looks at process name only, which means that you can enter java and that should work.

Revision history for this message
Peter (petru-severin) said :
#2

Yes, entering java works. However does this mean that timekpr won't be able to distinguish minecraft from any other java process that might be running at the same time?

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#3

You're correct, it won't be able to do that currently.

I had a dilemma, enable just process name, which is faster and more reliable and enable full command line, which is a tad slower, uses more memory and people can really enter some weird stuff there ending unwanted processes.
I went to faster and more safe way.

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#4

I'll implement cmdline search as well, at least quick POC works in my dev environment.
It will have to be enabled globally in the system the same way as PT master switch.

The restriction will be first 512 symbols of cmdline to conserve some memory for larger cmdlines, I think that'll be sufficient.

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#5

Feature released as beta.

Revision history for this message
Peter (petru-severin) said :
#6

I've tried and it works for me. Thanks!