Skip to main content
AlexFeren
New Member
October 15, 2015
Solved

Access to "/tmp/pl" file

  • October 15, 2015
  • 3 replies
  • 8433 views

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?

    Best answer by scao_FTNT

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

     

    Thanks

     

    Simon

    3 replies

    scao_FTNT
    Staff
    scao_FTNTAnswer
    Staff
    October 16, 2015

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

     

    Thanks

     

    Simon

    AlexFeren
    AlexFerenAuthor
    New Member
    October 22, 2015

    [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
    Staff
    Staff
    October 22, 2015

    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

    liviu
    Visitor III
    April 19, 2022

    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 & Editor
    Staff & Editor
    April 19, 2022

    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-v5-4/ta-p/192186

    -> 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

    liviu
    Visitor III
    April 19, 2022

    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!