Highlighted
Micro Focus Contributor
Micro Focus Contributor
583 views

(SM) Support Tip :There are 4 ways in which the background process can be started.

Jump to solution

The different ways to start the background processes are as below:
1.System Status.
Type "status" in sm command line.
Click on "start scheduler"
Select the background process you wish to start.
2.From startup
Type "db" in sm command line
Type table: "info"
select "startup", we can add the background processes here.This starts the background processes when the system starts.
3.From sm.cfg
In sm.cfg
sm –bg scheduler alert 60 1 –RTM:3 –debugdbquery:999
4.From command line
Ensure that the Service Manager Server is running.
Ensure that the Background process you are attempting to trace is NOT running.
From your Windows OS, click Start > Run > "enter the text "cmd" > Enter
Navigate to your Service Manager RUN Directory
*NOTE: Please do not copy/paste this command. Instead, please type the command in manually.

Generic Command Format:
sm –bg scheduler <background_process> 60 1 -RTM:3 -debugdbquery:999 -log:trace.txt
Eg:sm –bg scheduler KMUpdate 60 1 -RTM:3 -debugdbquery:999 -log:trace.txt


Which is the prefered way for tracing background process?

1. System status
· The Background process will have the same pid(process id) as the user who started the Background process.
· When the user logs off then the Background also terminates.
· Login as falcon:
4388( 6880) 02/21/2012 15:13:17 RTE I User falcon has logged in and is using a Named license (1 out of a maximum 1)

· Start the scheduler Agent from the system status.
4388( 6876) 02/21/2012 15:14:25 RAD W Scheduler started for agent class by agent at 02/21/12 02:44:25 GMT; sleep interval: 30 seconds; priority: -4

Observation: The process id of Falcon user and process id of the scheduler record is same.
Hence tracing the background process is difficult, due to same pid’s.

2. Startup:
· When the background process is started from the startup information record, all the background processes will have the same pid.

· The pid of the user who has logged in will be different from the pid of all the background processes. So even if the user logs off the background processes are not terminated.

· Here since the pid’s of all the background processes are same, it is difficult to isolate the operations performed by each background process.

1028( 1096) 02/21/2012 15:14:59 RAD W Scheduler started for agent class by agent at 02/21/12 02:44:25 GMT; sleep interval: 30 seconds; priority: -4

Note: from the snapshot observe the pid of all the background processes.

3. Command line
· Requires to kill the Background process which is running and execute the command from command line.
· Each Background has its one pid and its own tid and hence easy to debug.
4. Sm.cfg
Requires restart of SM services, for the debugging to be effective. This method is not suitable on production machines.

Labels (1)
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: There are 4 ways in which the background process can be started.

Jump to solution

In the first method you state:

 

1. System status
· The Background process will have the same pid(process id) as the user who started the Background process.
· When the user logs off then the Background also terminates.

 

The bg process does NOT terminate when the user logs off.  If you have experienced this and can reproduce it it should be considered a defect.

 

Note that starting in 9.31 SM has the ability to debug a user session or background process without the need to restart or use a special debugging command line.

 

See this topic  in the 9.31 release notes or in the online help:  Dynamic Debugging of User Sessions or Schedulers

 

Steve Hirschfeld

HP Support

 

View solution in original post

0 Likes
4 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: There are 4 ways in which the background process can be started.

Jump to solution

Hello Ashanag.

 

Hope you are doing great.

 

In my opinion the best method to use is from the cfg but as you mentioned, if it is not effective in production, the most common method we use is from the status.

The function will make effect in every background process that contain the pid related, the avantage is that if you want you can modify that specific pid, change it for an unique pid and not affect the rest of them.

For me, both are the best method, but that will depend of you and wich one would you feel more comfortable and easy to use.

Carlos Villalobos R
Customer Support Engineer
If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: There are 4 ways in which the background process can be started.

Jump to solution

In the first method you state:

 

1. System status
· The Background process will have the same pid(process id) as the user who started the Background process.
· When the user logs off then the Background also terminates.

 

The bg process does NOT terminate when the user logs off.  If you have experienced this and can reproduce it it should be considered a defect.

 

Note that starting in 9.31 SM has the ability to debug a user session or background process without the need to restart or use a special debugging command line.

 

See this topic  in the 9.31 release notes or in the online help:  Dynamic Debugging of User Sessions or Schedulers

 

Steve Hirschfeld

HP Support

 

View solution in original post

0 Likes
Highlighted
Micro Focus Contributor
Micro Focus Contributor

Re: There are 4 ways in which the background process can be started.

Jump to solution

Hi Carlos,

 

I am doing good thanks.

 

From your last post:

"The function will make effect in every background process that contain the pid related, the avantage is that if you want you can modify that specific pid, change it for an unique pid and not affect the rest of them"

 

Does this mean in Cfg file we can specify teh pid for the background process?

 

Regards,

Asha D Kumar

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: There are 4 ways in which the background process can be started.

Jump to solution

If you add a background process in the CFG file, that background process will have its own PID, different than the rest of the background processes, which normally live in the system.start process.

 

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.