1

I have Windows server whose c:\ drive is almost full. Only 2 GB is free instead of 60 GB, on which size of folder C:\Windows\System32\config\systemprofile is 24.1 GB. Folder is showing me two kind of files, javaxx.log and javaxx.log.lck. where xx is two digit number.

My questions are:

  • What data is contained by this folder?
  • Can we delete data from the path?
3

The %systemroot%\System32\config\systemprofile is the %USERPROFILE% equivalent for the system user nt authority\system: e.g. if you run command line as the system user, cd %AppData% will change to directory C:\Windows\System32\config\systemprofile\AppData\Roaming.

The javaXX.log files are probably generated by some Java program using FileHandler (from java.util.logging) with default settings or default log rotation pattern. Shortened, relevant parts:

By default each FileHandler is initialized using the following LogManager configuration properties where <handler-name> refers to the fully-qualified class name of the handler. If properties are not defined (or have invalid values) then the specified default values are used.

  • <handler-name>.pattern specifies a pattern for generating the output file name. See below for details. (Defaults to %h/java%u.log).

A pattern consists of a string that includes the following special components that will be replaced at runtime:

  • %h the value of the user.home system property
  • %g the generation number to distinguish rotated logs
  • %u a unique number to resolve conflicts

Generation numbers follow the sequence 0, 1, 2, etc.

The user.home would be %USERPROFILE% in Windows, so this would results in the naming pattern of your .log files. The .lck files are just lock files to prevent simultaneous usage of these files.

We can't say how important these log files are for you. You could create an automated script that removes the oldest log files, or even better implement this to the log rotation in the Java program.

  • 1
    Thank you very much for your detailed response, your detailed answer was very helpful to understand. – Puneet Dixit May 8 '18 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.