"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "scripts/mysqldiskusage.py" between
mysql-utilities-1.6.4.tar.gz and mysql-utilities-1.6.5.tar.gz

About: MySQL Utilities is a package of utilities that are used for maintenance and administration of MySQL servers (written in Python).

mysqldiskusage.py  (mysql-utilities-1.6.4):mysqldiskusage.py  (mysql-utilities-1.6.5)
#!/usr/bin/env python #!/usr/bin/env python
# #
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. # the Free Software Foundation; version 2 of the License.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# #
""" """
This file contains the disk usage utility for showing the estimated disk This file contains the disk usage utility for showing the estimated disk
storage of the databases and system files. storage of the databases and system files.
""" """
from mysql.utilities.common.tools import check_python_version
# Check Python version compatibility
check_python_version()
import os import os
import sys import sys
import time import time
from mysql.utilities.common.tools import check_python_version
from mysql.utilities.exception import FormatError, UtilError from mysql.utilities.exception import FormatError, UtilError
from mysql.utilities.command import diskusage from mysql.utilities.command import diskusage
from mysql.utilities.common.server import connect_servers from mysql.utilities.common.server import connect_servers
from mysql.utilities.common.tools import check_connector_python from mysql.utilities.common.tools import check_connector_python
from mysql.utilities.common.ip_parser import parse_connection from mysql.utilities.common.ip_parser import parse_connection
from mysql.utilities.common.options import (add_verbosity, add_format_option, from mysql.utilities.common.options import (add_verbosity, add_format_option,
add_no_headers_option, add_no_headers_option,
setup_common_options, setup_common_options,
check_password_security) check_password_security)
# Check Python version compatibility
check_python_version()
# Constants # Constants
NAME = "MySQL Utilities - mysqldiskusage " NAME = "MySQL Utilities - mysqldiskusage "
DESCRIPTION = "mysqldiskusage - show disk usage for databases" DESCRIPTION = "mysqldiskusage - show disk usage for databases"
USAGE = "%prog --server=user:pass@host:port:socket db1 --all" USAGE = "%prog --server=user:pass@host:port:socket db1 --all"
# Check for connector/python # Check for connector/python
if not check_connector_python(): if not check_connector_python():
sys.exit(1) sys.exit(1)
def print_elapsed_time(start_test): def print_elapsed_time(start_test):
 End of changes. 4 change blocks. 
6 lines changed or deleted 5 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS