Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
AlexFeren
New Contributor III

Access to "/tmp/pl" file

Commands like 'fmpolicy print-adom-object', 'fmpolicy print-adom-package', 'fmpolicy print-device-database', 'fmpolicy print-device-object', 'fmpolicy print-prov-templates' have an option to redirect their output to 'Output file name', by default, '/tmp/pl'.

However, I'm not able to find documentation on how to retrieve or use this file. Anyone?

1 Solution
scao_FTNT
Staff
Staff

We will improve this diag command and add export function for next patch release

 

Thanks

 

Simon

View solution in original post

7 REPLIES 7
scao_FTNT
Staff
Staff

We will improve this diag command and add export function for next patch release

 

Thanks

 

Simon

AlexFeren
New Contributor III

[strike]Answering my own question: use 'fnsysctl cp /tmp/pl /usb' to copy file to USB disk.[/strike]

It seems I made a mistake... fnsysctl isn't working in FortiManager (but is on FortiGate).

scao_FTNT

by the way, normally we just use console access software to log the screen output (save to its log file), which might be easier?

 

Thanks

 

Simon

scao_FTNT

I mean just without that "output file name" for "exec fmpolicy print", this is optional, and without a file name, it prints output on screen

 

Thanks

 

Simon

 

liviu
New Contributor

Dear all, the /tmp/pl file can't be accessed? I have to use the solution but looks like the output from the screen is not complete and I try to see the file saved on /tmp/pl. Do you know how to see it?

My commands:

1. execute fmpolicy print-adom-object RO_Admins "firewall address" all - show just last objects, not all

2. execute fmpolicy print-adom-object RO_Admins "firewall address" all /tmp/pl - save the file on tmp director but I cannot go there, how to export this file?

 

Debbie_FTNT
Staff
Staff

Hey liviu,

- there are options to get into the underlying Linux shell, where you could then get to the /tmp folder (and export the file via scp, or view the file with 'cat' or similar)

-> you have to enable shell access and set a shell password to do this

https://community.fortinet.com/t5/FortiAnalyzer/Technical-Note-Enable-Secure-Shell-in-FortiAnalyzer-...

-> This is for FortiAnalyzer, but also applies to FortiManager (including current versions as of writing, 7.0 and 7.2)

As an alternative:

- you can connect via PuTTY or a similar program and log the output to a file

-> FortiManager should dump all objects, even if you can't scroll back far enough to see all of them

+++ Divide by Cucumber Error. Please Reinstall Universe and Reboot +++
liviu

Dear Debbie,

I just manage to obtain the output. I used putty to log all sessions and after to save the entire file. Your suggestion was good and helpfull. Thank you again!

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors