$ python pgreport.py /home/samrat/pg_rewind/data-patched-sync/postgresql.conf
PostgresConf file location :/home/samrat/pg_rewind/data-patched-sync/postgresql.conf
Disk /dev/mapper/vg_puppetserver-lv_root doesn't contain a valid partition table
Disk /dev/mapper/vg_puppetserver-lv_swap doesn't contain a valid partition table
Disk /dev/mapper/vg_puppetserver-lv_root doesn't contain a valid partition table
Disk /dev/mapper/vg_puppetserver-lv_swap doesn't contain a valid partition table
Disk /dev/mapper/vg_puppetserver-lv_root doesn't contain a valid partition table
Disk /dev/mapper/vg_puppetserver-lv_swap doesn't contain a valid partition table
cat: /sys/block/mapper/queue/scheduler: No such file or directory
cat: /sys/block/mapper/queue/scheduler: No such file or directory
Finding os configuration.....
writing to os.conf....
Exctrating Memory Information information....
Exctracting kernel information....
Exctrating OS information.....
Finding RAID information....
finding disk and partitions information....
Finding file system information.....
finding disk read speed....
find scheduler information .....
Exctracting OS instruction length
Exctracting current value os shared_buffer from conf file
exctracting Total RAM Value
Calculating Recommended value of Shared buffer
['shb:Upper limit 8GB', 'shb:No need to change SHMMAX value']
Exctracting recommeded shared_buffer value from shared_memory
Calculating Recommended value for work memory
writting to recommend.txt
getting current value os work memory
getting default value for FSYNC
getting default value for synchronousCommit
getting defalut value for wal_buffers
getting total RAM
getting default value for full_pageWrites
getting shared buffer
getting wal_buffer
getting total_RAM
getting shared buffer
getting total_RAM
Traceback (most recent call last):
File "file_loc.py", line 249, in
do_cal()
File "file_loc.py", line 84, in do_cal
free_disk_part = find_free_space()
File "file_loc.py", line 43, in find_free_space
disk_free[lm[0]] = lm[4]
IndexError: list index out of range
Using font Courier size = 10
Input file => report
Writing pdf file report.pdf ...
Wrote file report.pdf
Improvement points:
PostgresConf file location :/home/samrat/pg_rewind/data-patched-sync/postgresql.conf
Its "postgresql.conf" not "PostgresConf" sorry for nitpicking comments but it matters a lot
Disk /dev/mapper/vg_puppetserver-lv_root doesn't contain a valid partition table
Disk /dev/mapper/vg_puppetserver-lv_swap doesn't contain a valid partition table
Disk /dev/mapper/vg_puppetserver-lv_root doesn't contain a valid partition table
Disk /dev/mapper/vg_puppetserver-lv_swap doesn't contain a valid partition table
Disk /dev/mapper/vg_puppetserver-lv_root doesn't contain a valid partition table
Disk /dev/mapper/vg_puppetserver-lv_swap doesn't contain a valid partition table
Why these errors are coming ?
cat: /sys/block/mapper/queue/scheduler: No such file or directory
cat: /sys/block/mapper/queue/scheduler: No such file or directory
Are there no scheduler related files on system ?
Finding os configuration.....
No need to append # before each message just keep it simple (as per standards)
Finding file system information.....
finding disk read speed....
find scheduler information .....
all the above messages are in "ing" form and this one differs form other
please maintain consistency in the system
Exctracting OS instruction length
Exctracting current value os shared_buffer from conf file
You mean "Exctracting current value of shared_buffer from conf file"
exctracting Total RAM Value
"Extracting total RAM value"
Calculating Recommended value of Shared buffer
No need to use short forms if you write shb then no one in PostgreSQL world will understand the meaning of it. just keep it as simple
['shb:Upper limit 8GB', 'shb:No need to change SHMMAX value']
why you are giving o/p recommendation here ? just keep it in final report
Exctracting recommeded shared_buffer value from shared_memory
Spell check
getting total RAM
what do you mean by total RAM ?
Traceback (most recent call last):
File "file_loc.py", line 249, in
Why you are giving traceback here ?
If you want to do it then you should use another file for that
IndexError: list index out of range
?
Using font Courier size = 10
Is there a need to add font information in o/p meassages?
I tested the module and found many problems in it also listed improvement points . Following is the snapshot for the same
You may feel that those are unnecessary changes, but it can confuse user who is not very well aware of PostgreSQL For reference you can look at some standard module that will help a lot reference: https://github.com/vmware/pg_rewind https://github.com/michaelpq/pg_arman
$ python pgreport.py /home/samrat/pg_rewind/data-patched-sync/postgresql.conf PostgresConf file location :/home/samrat/pg_rewind/data-patched-sync/postgresql.conf Disk /dev/mapper/vg_puppetserver-lv_root doesn't contain a valid partition table Disk /dev/mapper/vg_puppetserver-lv_swap doesn't contain a valid partition table Disk /dev/mapper/vg_puppetserver-lv_root doesn't contain a valid partition table Disk /dev/mapper/vg_puppetserver-lv_swap doesn't contain a valid partition table Disk /dev/mapper/vg_puppetserver-lv_root doesn't contain a valid partition table Disk /dev/mapper/vg_puppetserver-lv_swap doesn't contain a valid partition table cat: /sys/block/mapper/queue/scheduler: No such file or directory cat: /sys/block/mapper/queue/scheduler: No such file or directory
Finding os configuration.....
writing to os.conf....
Exctrating Memory Information information....
Exctracting kernel information....
Exctrating OS information.....
Finding RAID information....
finding disk and partitions information....
Finding file system information.....
finding disk read speed....
find scheduler information .....
Exctracting OS instruction length
Exctracting current value os shared_buffer from conf file
exctracting Total RAM Value
Calculating Recommended value of Shared buffer
['shb:Upper limit 8GB', 'shb:No need to change SHMMAX value']
Exctracting recommeded shared_buffer value from shared_memory
Calculating Recommended value for work memory
writting to recommend.txt
getting current value os work memory
getting default value for FSYNC
getting default value for synchronousCommit
getting defalut value for wal_buffers
getting total RAM
getting default value for full_pageWrites
getting shared buffer
getting wal_buffer
getting total_RAM
getting shared buffer
getting total_RAM
Traceback (most recent call last): File "file_loc.py", line 249, in
do_cal()
File "file_loc.py", line 84, in do_cal
free_disk_part = find_free_space()
File "file_loc.py", line 43, in find_free_space
disk_free[lm[0]] = lm[4]
IndexError: list index out of range
Using font Courier size = 10 Input file => report Writing pdf file report.pdf ... Wrote file report.pdf
Improvement points:
feel free to ask me if you have any problem :)