Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sipp changes working dir if script specified with path #399

Closed
sergey-safarov opened this issue May 22, 2019 · 8 comments
Closed

sipp changes working dir if script specified with path #399

sergey-safarov opened this issue May 22, 2019 · 8 comments
Milestone

Comments

@sergey-safarov
Copy link

I want place sipp log files (used -trace_err -trace_screen option) in directory /var/log/sipp.
Do to this is executed

[root@Nieblestim_RS02 sipp]# cd /var/log/sipp/
[root@Nieblestim_RS02 sipp]# pwd
/var/log/sipp
[root@Nieblestim_RS02 sipp]# rm -f /etc/sipp/*.log
[root@Nieblestim_RS02 sipp]# ls -l /etc/sipp/
total 24
-rw-r--r-- 1 root root 5224 May 21 19:12 3pcc-C-A.xml
-rw-r--r-- 1 root root 5045 May 21 19:12 3pcc-C-B.xml
-rw-r--r-- 1 root root   80 May 21 06:08 data.csv
-rw-r--r-- 1 root root   53 May 21 14:43 env
[root@Nieblestim_RS02 sipp]# sipp -sf /etc/sipp/3pcc-C-A.xml \
                                  -3pcc localhost:7770 \
                                  -r 1 \
                                  -m 1 \
                                  -s 3444333 \
                                  -p 15083 \
                                  -trace_err \
                                  -trace_screen \
                                  -i 103.24.157.134 \
                                  103.24.157.134:15080

After script start i can see logs in /etc/sipp folder.

[root@Nieblestim_RS02 sipp]# ls -l /etc/sipp
total 28
-rw-r--r-- 1 root root  167 May 22 09:09 3pcc-C-A_183242_errors.log
-rw-r--r-- 1 root root    0 May 22 09:09 3pcc-C-A_183242_screen.log
-rw-r--r-- 1 root root 5224 May 21 19:12 3pcc-C-A.xml
-rw-r--r-- 1 root root 5045 May 21 19:12 3pcc-C-B.xml
-rw-r--r-- 1 root root   80 May 21 06:08 data.csv
-rw-r--r-- 1 root root   53 May 21 14:43 env
[root@Nieblestim_RS02 sipp]# 

Could sipp not change current dir when accessed script files.

@wdoekes
Copy link
Member

wdoekes commented May 22, 2019

Well...

it's not a chdir thing, but a scenario_file thing:

static void rotatef(struct logfile_info* lfi)
{
    char L_rotate_file_name [MAX_PATH];

    if (!lfi->fixedname) {
        sprintf (lfi->file_name, "%s_%ld_%s.log", scenario_file, (long) getpid(), lfi->name);
    }

In your case scenario_file is not 3pcc-C-A, but /etc/sipp/3pcc-C-A, so the log files go there too.

Not sure if we want to change this behaviour.

@wdoekes
Copy link
Member

wdoekes commented May 22, 2019

(OTOH, if we want to change it, now is the time.)

@wdoekes wdoekes added this to the 3.6 milestone May 22, 2019
wdoekes added a commit that referenced this issue May 27, 2019
Instead of them being relative to the scenario file, they are now placed in the
current working directory. This makes more sense.

Closes #399
wdoekes added a commit that referenced this issue May 27, 2019
Instead of them being relative to the scenario file, they are now placed in the
current working directory. This makes more sense.

Closes #399
@sergey-safarov
Copy link
Author

i checked current master.
Now logs created in current directory.

@wdoekes
Copy link
Member

wdoekes commented May 29, 2019

Happy?

@sergey-safarov
Copy link
Author

yes.
Thanks you Walter @wdoekes

@rysj
Copy link
Contributor

rysj commented May 27, 2021

This change broke large automated system that expects the sipp log files to be placed in scenario folders.

@sergey-safarov
Copy link
Author

sergey-safarov commented May 27, 2021

You can add automated system command like

cd ${sipp_log_files_folder}

And then start sipp.

can you change large automated system script?

@sergey-safarov
Copy link
Author

Another option you can use sipp 3.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants